diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec
index c9f8c4fba2..d3ab992a23 100644
--- a/build/NuSpecs/UmbracoCms.nuspec
+++ b/build/NuSpecs/UmbracoCms.nuspec
@@ -17,7 +17,7 @@
-
+
diff --git a/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs b/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs
index 07c9a8ded2..1a4e7ae1a9 100644
--- a/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs
+++ b/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Collections
///
/// Initializes a new instance of the struct.
///
- public CompositeTypeTypeKey(Type type1, Type type2)
+ public CompositeTypeTypeKey(Type type1, Type type2) : this()
{
Type1 = type1;
Type2 = type2;
@@ -19,26 +19,35 @@ namespace Umbraco.Core.Collections
///
/// Gets the first type.
///
- public Type Type1 { get; }
+ public Type Type1 { get; private set; }
///
/// Gets the second type.
///
- public Type Type2 { get; }
+ public Type Type2 { get; private set; }
///
public bool Equals(CompositeTypeTypeKey other)
- => Type1 == other.Type1 && Type2 == other.Type2;
+ {
+ return Type1 == other.Type1 && Type2 == other.Type2;
+ }
///
public override bool Equals(object obj)
- => obj is CompositeTypeTypeKey other && Type1 == other.Type1 && Type2 == other.Type2;
+ {
+ var other = obj is CompositeTypeTypeKey ? (CompositeTypeTypeKey)obj : default(CompositeTypeTypeKey);
+ return Type1 == other.Type1 && Type2 == other.Type2;
+ }
public static bool operator ==(CompositeTypeTypeKey key1, CompositeTypeTypeKey key2)
- => key1.Type1 == key2.Type1 && key1.Type2 == key2.Type2;
+ {
+ return key1.Type1 == key2.Type1 && key1.Type2 == key2.Type2;
+ }
public static bool operator !=(CompositeTypeTypeKey key1, CompositeTypeTypeKey key2)
- => key1.Type1 != key2.Type1 || key1.Type2 != key2.Type2;
+ {
+ return key1.Type1 != key2.Type1 || key1.Type2 != key2.Type2;
+ }
///
public override int GetHashCode()
diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs
index 1e3c75ee6d..ccd379f7d2 100644
--- a/src/Umbraco.Core/ObjectExtensions.cs
+++ b/src/Umbraco.Core/ObjectExtensions.cs
@@ -140,7 +140,8 @@ namespace Umbraco.Core
if (underlying != null)
{
// Special case for empty strings for bools/dates which should return null if an empty string.
- if (input is string inputString)
+ var inputString = input as string;
+ if (inputString != null)
{
if (string.IsNullOrEmpty(inputString) && (underlying == typeof(DateTime) || underlying == typeof(bool)))
{
@@ -166,7 +167,8 @@ namespace Umbraco.Core
{
// target is not a generic type
- if (input is string inputString)
+ var inputString = input as string;
+ if (inputString != null)
{
// Try convert from string, returns an Attempt if the string could be
// processed (either succeeded or failed), else null if we need to try
@@ -207,7 +209,8 @@ namespace Umbraco.Core
}
// Re-check convertables since we altered the input through recursion
- if (input is IConvertible convertible2)
+ var convertible2 = input as IConvertible;
+ if (convertible2 != null)
{
return Attempt.Succeed(Convert.ChangeType(convertible2, target));
}
@@ -265,7 +268,8 @@ namespace Umbraco.Core
{
if (target == typeof(int))
{
- if (int.TryParse(input, out var value))
+ int value;
+ if (int.TryParse(input, out value))
{
return Attempt