diff --git a/lib/SQLCE4/System.Data.SqlServerCe.Entity.dll b/lib/SQLCE4/System.Data.SqlServerCe.Entity.dll
index 8142f0c105..3d7692a0b9 100644
Binary files a/lib/SQLCE4/System.Data.SqlServerCe.Entity.dll and b/lib/SQLCE4/System.Data.SqlServerCe.Entity.dll differ
diff --git a/lib/SQLCE4/System.Data.SqlServerCe.dll b/lib/SQLCE4/System.Data.SqlServerCe.dll
index 376bdacf9f..acf228b726 100644
Binary files a/lib/SQLCE4/System.Data.SqlServerCe.dll and b/lib/SQLCE4/System.Data.SqlServerCe.dll differ
diff --git a/lib/SQLCE4/amd64/sqlceca40.dll b/lib/SQLCE4/amd64/sqlceca40.dll
index aa6b2e0ed2..d5d4c20448 100644
Binary files a/lib/SQLCE4/amd64/sqlceca40.dll and b/lib/SQLCE4/amd64/sqlceca40.dll differ
diff --git a/lib/SQLCE4/amd64/sqlcecompact40.dll b/lib/SQLCE4/amd64/sqlcecompact40.dll
index 263e458f23..ed061adee6 100644
Binary files a/lib/SQLCE4/amd64/sqlcecompact40.dll and b/lib/SQLCE4/amd64/sqlcecompact40.dll differ
diff --git a/lib/SQLCE4/amd64/sqlceer40EN.dll b/lib/SQLCE4/amd64/sqlceer40EN.dll
index 197f38eb06..e19eed9bda 100644
Binary files a/lib/SQLCE4/amd64/sqlceer40EN.dll and b/lib/SQLCE4/amd64/sqlceer40EN.dll differ
diff --git a/lib/SQLCE4/amd64/sqlceme40.dll b/lib/SQLCE4/amd64/sqlceme40.dll
index 8f42f181c4..c67fc9e6a5 100644
Binary files a/lib/SQLCE4/amd64/sqlceme40.dll and b/lib/SQLCE4/amd64/sqlceme40.dll differ
diff --git a/lib/SQLCE4/amd64/sqlceqp40.dll b/lib/SQLCE4/amd64/sqlceqp40.dll
index 899b080cbb..df4440332d 100644
Binary files a/lib/SQLCE4/amd64/sqlceqp40.dll and b/lib/SQLCE4/amd64/sqlceqp40.dll differ
diff --git a/lib/SQLCE4/amd64/sqlcese40.dll b/lib/SQLCE4/amd64/sqlcese40.dll
index fa39afa751..af2de5ec90 100644
Binary files a/lib/SQLCE4/amd64/sqlcese40.dll and b/lib/SQLCE4/amd64/sqlcese40.dll differ
diff --git a/lib/SQLCE4/x86/sqlceca40.dll b/lib/SQLCE4/x86/sqlceca40.dll
index 53d50a29f8..92596101eb 100644
Binary files a/lib/SQLCE4/x86/sqlceca40.dll and b/lib/SQLCE4/x86/sqlceca40.dll differ
diff --git a/lib/SQLCE4/x86/sqlcecompact40.dll b/lib/SQLCE4/x86/sqlcecompact40.dll
index 452a26e49e..41c69ecc51 100644
Binary files a/lib/SQLCE4/x86/sqlcecompact40.dll and b/lib/SQLCE4/x86/sqlcecompact40.dll differ
diff --git a/lib/SQLCE4/x86/sqlceer40EN.dll b/lib/SQLCE4/x86/sqlceer40EN.dll
index f8656b0a91..a40154fd37 100644
Binary files a/lib/SQLCE4/x86/sqlceer40EN.dll and b/lib/SQLCE4/x86/sqlceer40EN.dll differ
diff --git a/lib/SQLCE4/x86/sqlceme40.dll b/lib/SQLCE4/x86/sqlceme40.dll
index 6aeb1cb49b..d737119fa3 100644
Binary files a/lib/SQLCE4/x86/sqlceme40.dll and b/lib/SQLCE4/x86/sqlceme40.dll differ
diff --git a/lib/SQLCE4/x86/sqlceqp40.dll b/lib/SQLCE4/x86/sqlceqp40.dll
index d1498fa33b..dedfc9a3ce 100644
Binary files a/lib/SQLCE4/x86/sqlceqp40.dll and b/lib/SQLCE4/x86/sqlceqp40.dll differ
diff --git a/lib/SQLCE4/x86/sqlcese40.dll b/lib/SQLCE4/x86/sqlcese40.dll
index 731b01d797..cc37e3b549 100644
Binary files a/lib/SQLCE4/x86/sqlcese40.dll and b/lib/SQLCE4/x86/sqlcese40.dll differ
diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs
index 5f164df1c0..634749dd25 100644
--- a/src/Umbraco.Core/Configuration/GlobalSettings.cs
+++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Xml;
+using System.Xml.Linq;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
@@ -197,13 +198,19 @@ namespace Umbraco.Core.Configuration
vDir = v.PhysicalDirectory;
}
}
-
- var doc = new XmlDocument();
- doc.Load(String.Concat(vDir, "web.config"));
- var root = doc.DocumentElement;
- var setting = doc.SelectSingleNode(String.Concat("//appSettings/add[@key='", key, "']"));
- setting.Attributes["value"].InnerText = value;
- doc.Save(String.Concat(vDir, "web.config"));
+
+ string fileName = String.Concat(vDir, "web.config");
+ var xml = XDocument.Load(fileName);
+ var appSettings = xml.Root.Descendants("appSettings").Single();
+
+ // Update appSetting if it exists, or else create a new appSetting for the given key and value
+ var setting = appSettings.Descendants("add").Where(s => s.Attribute("key").Value == key).FirstOrDefault();
+ if (setting == null)
+ appSettings.Add(new XElement("add", new XAttribute("key", key), new XAttribute("value", value)));
+ else
+ setting.Attribute("value").Value = value;
+
+ xml.Save(fileName);
ConfigurationManager.RefreshSection("appSettings");
}
diff --git a/src/Umbraco.Core/Dynamics/ExtensionMethodFinder.cs b/src/Umbraco.Core/Dynamics/ExtensionMethodFinder.cs
index fdfa8e35f7..6dd8a1ad12 100644
--- a/src/Umbraco.Core/Dynamics/ExtensionMethodFinder.cs
+++ b/src/Umbraco.Core/Dynamics/ExtensionMethodFinder.cs
@@ -9,10 +9,11 @@ using System.Linq.Expressions;
namespace Umbraco.Core.Dynamics
{
+ ///
+ /// Utility class for finding extension methods on a type to execute
+ ///
internal static class ExtensionMethodFinder
- {
-
-
+ {
///
/// Returns all extension methods found matching the definition
///
@@ -22,7 +23,7 @@ namespace Umbraco.Core.Dynamics
///
///
///
- /// NOTE: This will be an intensive method to call!! Results should be cached!
+ /// TODO: NOTE: This will be an intensive method to call!! Results should be cached!
///
private static IEnumerable GetAllExtensionMethods(Type thisType, string name, int argumentCount, bool argsContainsThis)
{
@@ -62,7 +63,8 @@ namespace Umbraco.Core.Dynamics
return methodsWhereArgZeroIsTargetType.Select(mt => mt.m);
}
- private static bool MethodArgZeroHasCorrectTargetType(MethodInfo method, Type firstArgumentType, Type thisType)
+
+ private static bool MethodArgZeroHasCorrectTargetType(MethodInfo method, Type firstArgumentType, Type thisType)
{
//This is done with seperate method calls because you can't debug/watch lamdas - if you're trying to figure
//out why the wrong method is returned, it helps to be able to see each boolean result
@@ -112,7 +114,8 @@ namespace Umbraco.Core.Dynamics
bool result = (thisType == firstArgumentType);
return result;
}
- private static Type FirstParameterType(MethodInfo m)
+
+ private static Type FirstParameterType(MethodInfo m)
{
ParameterInfo[] p = m.GetParameters();
if (p.Any())
@@ -122,71 +125,74 @@ namespace Umbraco.Core.Dynamics
return null;
}
+ private static MethodInfo DetermineMethodFromParams(IEnumerable methods, Type genericType, IEnumerable