diff --git a/src/Umbraco.Core/Composing/ComponentComposer.cs b/src/Umbraco.Abstractions/Composing/ComponentComposer.cs similarity index 95% rename from src/Umbraco.Core/Composing/ComponentComposer.cs rename to src/Umbraco.Abstractions/Composing/ComponentComposer.cs index b93ec49a89..72f9dfe5e2 100644 --- a/src/Umbraco.Core/Composing/ComponentComposer.cs +++ b/src/Umbraco.Abstractions/Composing/ComponentComposer.cs @@ -1,5 +1,4 @@ -using Umbraco.Core.Compose; - + namespace Umbraco.Core.Composing { /// diff --git a/src/Umbraco.Core/Composing/ComposeAfterAttribute.cs b/src/Umbraco.Abstractions/Composing/ComposeAfterAttribute.cs similarity index 100% rename from src/Umbraco.Core/Composing/ComposeAfterAttribute.cs rename to src/Umbraco.Abstractions/Composing/ComposeAfterAttribute.cs diff --git a/src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs b/src/Umbraco.Abstractions/Composing/ComposeBeforeAttribute.cs similarity index 100% rename from src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs rename to src/Umbraco.Abstractions/Composing/ComposeBeforeAttribute.cs diff --git a/src/Umbraco.Core/Composing/Composers.cs b/src/Umbraco.Abstractions/Composing/Composers.cs similarity index 100% rename from src/Umbraco.Core/Composing/Composers.cs rename to src/Umbraco.Abstractions/Composing/Composers.cs diff --git a/src/Umbraco.Core/Composing/IUserComposer.cs b/src/Umbraco.Abstractions/Composing/IUserComposer.cs similarity index 100% rename from src/Umbraco.Core/Composing/IUserComposer.cs rename to src/Umbraco.Abstractions/Composing/IUserComposer.cs diff --git a/src/Umbraco.Core/Composing/TargetedServiceFactory.cs b/src/Umbraco.Abstractions/Composing/TargetedServiceFactory.cs similarity index 100% rename from src/Umbraco.Core/Composing/TargetedServiceFactory.cs rename to src/Umbraco.Abstractions/Composing/TargetedServiceFactory.cs diff --git a/src/Umbraco.Abstractions/CompositionExtensions.cs b/src/Umbraco.Abstractions/CompositionExtensions.cs new file mode 100644 index 0000000000..c65cff50d6 --- /dev/null +++ b/src/Umbraco.Abstractions/CompositionExtensions.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Umbraco.Core.Composing; + +namespace Umbraco.Core +{ + public static partial class CompositionExtensions + { + + #region Collection Builders + + /// + /// Gets the components collection builder. + /// + public static ComponentCollectionBuilder Components(this Composition composition) + => composition.WithCollectionBuilder(); + + #endregion + } +} diff --git a/src/Umbraco.Abstractions/TypeExtensions.cs b/src/Umbraco.Abstractions/TypeExtensions.cs index 4f55b6458c..c656aa6373 100644 --- a/src/Umbraco.Abstractions/TypeExtensions.cs +++ b/src/Umbraco.Abstractions/TypeExtensions.cs @@ -1,11 +1,419 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using Umbraco.Core.Composing; namespace Umbraco.Core { public static class TypeExtensions { + public static object GetDefaultValue(this Type t) + { + return t.IsValueType + ? Activator.CreateInstance(t) + : null; + } + internal static MethodInfo GetGenericMethod(this Type type, string name, params Type[] parameterTypes) + { + var methods = type.GetMethods().Where(method => method.Name == name); + + foreach (var method in methods) + { + if (method.HasParameters(parameterTypes)) + return method; + } + + return null; + } + + /// + /// Checks if the type is an anonymous type + /// + /// + /// + /// + /// reference: http://jclaes.blogspot.com/2011/05/checking-for-anonymous-types.html + /// + public static bool IsAnonymousType(this Type type) + { + if (type == null) throw new ArgumentNullException("type"); + + + return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute), false) + && type.IsGenericType && type.Name.Contains("AnonymousType") + && (type.Name.StartsWith("<>") || type.Name.StartsWith("VB$")) + && (type.Attributes & TypeAttributes.NotPublic) == TypeAttributes.NotPublic; + } + + + + /// + /// Determines whether the specified type is enumerable. + /// + /// The type. + /// + internal static bool HasParameters(this MethodInfo method, params Type[] parameterTypes) + { + var methodParameters = method.GetParameters().Select(parameter => parameter.ParameterType).ToArray(); + + if (methodParameters.Length != parameterTypes.Length) + return false; + + for (int i = 0; i < methodParameters.Length; i++) + if (methodParameters[i].ToString() != parameterTypes[i].ToString()) + return false; + + return true; + } + + public static IEnumerable GetBaseTypes(this Type type, bool andSelf) + { + if (andSelf) + yield return type; + + while ((type = type.BaseType) != null) + yield return type; + } + + public static IEnumerable AllMethods(this Type target) + { + //var allTypes = target.AllInterfaces().ToList(); + var allTypes = target.GetInterfaces().ToList(); // GetInterfaces is ok here + allTypes.Add(target); + + return allTypes.SelectMany(t => t.GetMethods()); + } + + /// + /// true if the specified type is enumerable; otherwise, false. + /// + public static bool IsEnumerable(this Type type) + { + if (type.IsGenericType) + { + if (type.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IEnumerable))) + return true; + } + else + { + if (type.GetInterfaces().Contains(typeof(IEnumerable))) + return true; + } + return false; + } + + /// + /// Determines whether [is of generic type] [the specified type]. + /// + /// The type. + /// Type of the generic. + /// + /// true if [is of generic type] [the specified type]; otherwise, false. + /// + public static bool IsOfGenericType(this Type type, Type genericType) + { + Type[] args; + return type.TryGetGenericArguments(genericType, out args); + } + + /// + /// Will find the generic type of the 'type' parameter passed in that is equal to the 'genericType' parameter passed in + /// + /// + /// + /// + /// + public static bool TryGetGenericArguments(this Type type, Type genericType, out Type[] genericArgType) + { + if (type == null) + { + throw new ArgumentNullException("type"); + } + if (genericType == null) + { + throw new ArgumentNullException("genericType"); + } + if (genericType.IsGenericType == false) + { + throw new ArgumentException("genericType must be a generic type"); + } + + Func checkGenericType = (@int, t) => + { + if (@int.IsGenericType) + { + var def = @int.GetGenericTypeDefinition(); + if (def == t) + { + return @int.GetGenericArguments(); + } + } + return null; + }; + + //first, check if the type passed in is already the generic type + genericArgType = checkGenericType(type, genericType); + if (genericArgType != null) + return true; + + //if we're looking for interfaces, enumerate them: + if (genericType.IsInterface) + { + foreach (Type @interface in type.GetInterfaces()) + { + genericArgType = checkGenericType(@interface, genericType); + if (genericArgType != null) + return true; + } + } + else + { + //loop back into the base types as long as they are generic + while (type.BaseType != null && type.BaseType != typeof(object)) + { + genericArgType = checkGenericType(type.BaseType, genericType); + if (genericArgType != null) + return true; + type = type.BaseType; + } + + } + + return false; + + } + + /// + /// Gets all properties in a flat hierarchy + /// + /// Includes both Public and Non-Public properties + /// + /// + public static PropertyInfo[] GetAllProperties(this Type type) + { + if (type.IsInterface) + { + var propertyInfos = new List(); + + var considered = new List(); + var queue = new Queue(); + considered.Add(type); + queue.Enqueue(type); + while (queue.Count > 0) + { + var subType = queue.Dequeue(); + foreach (var subInterface in subType.GetInterfaces()) + { + if (considered.Contains(subInterface)) continue; + + considered.Add(subInterface); + queue.Enqueue(subInterface); + } + + var typeProperties = subType.GetProperties( + BindingFlags.FlattenHierarchy + | BindingFlags.Public + | BindingFlags.NonPublic + | BindingFlags.Instance); + + var newPropertyInfos = typeProperties + .Where(x => !propertyInfos.Contains(x)); + + propertyInfos.InsertRange(0, newPropertyInfos); + } + + return propertyInfos.ToArray(); + } + + return type.GetProperties(BindingFlags.FlattenHierarchy + | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + } + + /// + /// Returns all public properties including inherited properties even for interfaces + /// + /// + /// + /// + /// taken from http://stackoverflow.com/questions/358835/getproperties-to-return-all-properties-for-an-interface-inheritance-hierarchy + /// + public static PropertyInfo[] GetPublicProperties(this Type type) + { + if (type.IsInterface) + { + var propertyInfos = new List(); + + var considered = new List(); + var queue = new Queue(); + considered.Add(type); + queue.Enqueue(type); + while (queue.Count > 0) + { + var subType = queue.Dequeue(); + foreach (var subInterface in subType.GetInterfaces()) + { + if (considered.Contains(subInterface)) continue; + + considered.Add(subInterface); + queue.Enqueue(subInterface); + } + + var typeProperties = subType.GetProperties( + BindingFlags.FlattenHierarchy + | BindingFlags.Public + | BindingFlags.Instance); + + var newPropertyInfos = typeProperties + .Where(x => !propertyInfos.Contains(x)); + + propertyInfos.InsertRange(0, newPropertyInfos); + } + + return propertyInfos.ToArray(); + } + + return type.GetProperties(BindingFlags.FlattenHierarchy + | BindingFlags.Public | BindingFlags.Instance); + } + + /// + /// Determines whether the specified actual type is type. + /// + /// + /// The actual type. + /// + /// true if the specified actual type is type; otherwise, false. + /// + public static bool IsType(this Type actualType) + { + return TypeHelper.IsTypeAssignableFrom(actualType); + } + + public static bool Inherits(this Type type) + { + return typeof(TBase).IsAssignableFrom(type); + } + + public static bool Inherits(this Type type, Type tbase) + { + return tbase.IsAssignableFrom(type); + } + + public static bool Implements(this Type type) + { + return typeof(TInterface).IsAssignableFrom(type); + } + + public static TAttribute FirstAttribute(this Type type) + { + return type.FirstAttribute(true); + } + + public static TAttribute FirstAttribute(this Type type, bool inherit) + { + var attrs = type.GetCustomAttributes(typeof(TAttribute), inherit); + return (TAttribute)(attrs.Length > 0 ? attrs[0] : null); + } + + public static TAttribute FirstAttribute(this PropertyInfo propertyInfo) + { + return propertyInfo.FirstAttribute(true); + } + + public static TAttribute FirstAttribute(this PropertyInfo propertyInfo, bool inherit) + { + var attrs = propertyInfo.GetCustomAttributes(typeof(TAttribute), inherit); + return (TAttribute)(attrs.Length > 0 ? attrs[0] : null); + } + + public static IEnumerable MultipleAttribute(this PropertyInfo propertyInfo) + { + return propertyInfo.MultipleAttribute(true); + } + + public static IEnumerable MultipleAttribute(this PropertyInfo propertyInfo, bool inherit) + { + var attrs = propertyInfo.GetCustomAttributes(typeof(TAttribute), inherit); + return (attrs.Length > 0 ? attrs.ToList().ConvertAll(input => (TAttribute)input) : null); + } + + /// + /// Returns the full type name with the assembly but without all of the assembly specific version information. + /// + /// + /// + /// + /// This method is like an 'in between' of Type.FullName and Type.AssemblyQualifiedName which returns the type and the assembly separated + /// by a comma. + /// + /// + /// The output of this class would be: + /// + /// Umbraco.Core.TypeExtensions, Umbraco.Core + /// + public static string GetFullNameWithAssembly(this Type type) + { + var assemblyName = type.Assembly.GetName(); + + return string.Concat(type.FullName, ", ", + assemblyName.FullName.StartsWith("App_Code.") ? "App_Code" : assemblyName.Name); + } + + /// + /// Determines whether an instance of a specified type can be assigned to the current type instance. + /// + /// The current type. + /// The type to compare with the current type. + /// A value indicating whether an instance of the specified type can be assigned to the current type instance. + /// This extended version supports the current type being a generic type definition, and will + /// consider that eg List{int} is "assignable to" IList{}. + public static bool IsAssignableFromGtd(this Type type, Type c) + { + // type *can* be a generic type definition + // c is a real type, cannot be a generic type definition + + if (type.IsGenericTypeDefinition == false) + return type.IsAssignableFrom(c); + + if (c.IsInterface == false) + { + var t = c; + while (t != typeof(object)) + { + if (t.IsGenericType && t.GetGenericTypeDefinition() == type) return true; + t = t.BaseType; + } + } + + return c.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == type); + } + + /// + /// If the given is an array or some other collection + /// comprised of 0 or more instances of a "subtype", get that type + /// + /// the source type + /// + internal static Type GetEnumeratedType(this Type type) + { + if (typeof(IEnumerable).IsAssignableFrom(type) == false) + return null; + + // provided by Array + var elType = type.GetElementType(); + if (null != elType) return elType; + + // otherwise provided by collection + var elTypes = type.GetGenericArguments(); + if (elTypes.Length > 0) return elTypes[0]; + + // otherwise is not an 'enumerated' type + return null; + } + public static T GetCustomAttribute(this Type type, bool inherit) where T : Attribute { diff --git a/src/Umbraco.Core/CompositionExtensions.cs b/src/Umbraco.Core/CompositionExtensions.cs index 5dd33c2a60..2d8254a3c0 100644 --- a/src/Umbraco.Core/CompositionExtensions.cs +++ b/src/Umbraco.Core/CompositionExtensions.cs @@ -77,11 +77,7 @@ namespace Umbraco.Core public static ManifestFilterCollectionBuilder ManifestFilters(this Composition composition) => composition.WithCollectionBuilder(); - /// - /// Gets the components collection builder. - /// - public static ComponentCollectionBuilder Components(this Composition composition) - => composition.WithCollectionBuilder(); + #endregion diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs index 9d4d196bb5..5cc1270669 100644 --- a/src/Umbraco.Core/TypeExtensions.cs +++ b/src/Umbraco.Core/TypeExtensions.cs @@ -58,409 +58,6 @@ namespace Umbraco.Core return attempt; } - - public static object GetDefaultValue(this Type t) - { - return t.IsValueType - ? Activator.CreateInstance(t) - : null; - } - internal static MethodInfo GetGenericMethod(this Type type, string name, params Type[] parameterTypes) - { - var methods = type.GetMethods().Where(method => method.Name == name); - - foreach (var method in methods) - { - if (method.HasParameters(parameterTypes)) - return method; - } - - return null; - } - - /// - /// Checks if the type is an anonymous type - /// - /// - /// - /// - /// reference: http://jclaes.blogspot.com/2011/05/checking-for-anonymous-types.html - /// - public static bool IsAnonymousType(this Type type) - { - if (type == null) throw new ArgumentNullException("type"); - - - return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute), false) - && type.IsGenericType && type.Name.Contains("AnonymousType") - && (type.Name.StartsWith("<>") || type.Name.StartsWith("VB$")) - && (type.Attributes & TypeAttributes.NotPublic) == TypeAttributes.NotPublic; - } - - - - /// - /// Determines whether the specified type is enumerable. - /// - /// The type. - /// - internal static bool HasParameters(this MethodInfo method, params Type[] parameterTypes) - { - var methodParameters = method.GetParameters().Select(parameter => parameter.ParameterType).ToArray(); - - if (methodParameters.Length != parameterTypes.Length) - return false; - - for (int i = 0; i < methodParameters.Length; i++) - if (methodParameters[i].ToString() != parameterTypes[i].ToString()) - return false; - - return true; - } - - public static IEnumerable GetBaseTypes(this Type type, bool andSelf) - { - if (andSelf) - yield return type; - - while ((type = type.BaseType) != null) - yield return type; - } - - public static IEnumerable AllMethods(this Type target) - { - //var allTypes = target.AllInterfaces().ToList(); - var allTypes = target.GetInterfaces().ToList(); // GetInterfaces is ok here - allTypes.Add(target); - - return allTypes.SelectMany(t => t.GetMethods()); - } - - /// - /// true if the specified type is enumerable; otherwise, false. - /// - public static bool IsEnumerable(this Type type) - { - if (type.IsGenericType) - { - if (type.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IEnumerable))) - return true; - } - else - { - if (type.GetInterfaces().Contains(typeof(IEnumerable))) - return true; - } - return false; - } - - /// - /// Determines whether [is of generic type] [the specified type]. - /// - /// The type. - /// Type of the generic. - /// - /// true if [is of generic type] [the specified type]; otherwise, false. - /// - public static bool IsOfGenericType(this Type type, Type genericType) - { - Type[] args; - return type.TryGetGenericArguments(genericType, out args); - } - - /// - /// Will find the generic type of the 'type' parameter passed in that is equal to the 'genericType' parameter passed in - /// - /// - /// - /// - /// - public static bool TryGetGenericArguments(this Type type, Type genericType, out Type[] genericArgType) - { - if (type == null) - { - throw new ArgumentNullException("type"); - } - if (genericType == null) - { - throw new ArgumentNullException("genericType"); - } - if (genericType.IsGenericType == false) - { - throw new ArgumentException("genericType must be a generic type"); - } - - Func checkGenericType = (@int, t) => - { - if (@int.IsGenericType) - { - var def = @int.GetGenericTypeDefinition(); - if (def == t) - { - return @int.GetGenericArguments(); - } - } - return null; - }; - - //first, check if the type passed in is already the generic type - genericArgType = checkGenericType(type, genericType); - if (genericArgType != null) - return true; - - //if we're looking for interfaces, enumerate them: - if (genericType.IsInterface) - { - foreach (Type @interface in type.GetInterfaces()) - { - genericArgType = checkGenericType(@interface, genericType); - if (genericArgType != null) - return true; - } - } - else - { - //loop back into the base types as long as they are generic - while (type.BaseType != null && type.BaseType != typeof(object)) - { - genericArgType = checkGenericType(type.BaseType, genericType); - if (genericArgType != null) - return true; - type = type.BaseType; - } - - } - - return false; - - } - - /// - /// Gets all properties in a flat hierarchy - /// - /// Includes both Public and Non-Public properties - /// - /// - public static PropertyInfo[] GetAllProperties(this Type type) - { - if (type.IsInterface) - { - var propertyInfos = new List(); - - var considered = new List(); - var queue = new Queue(); - considered.Add(type); - queue.Enqueue(type); - while (queue.Count > 0) - { - var subType = queue.Dequeue(); - foreach (var subInterface in subType.GetInterfaces()) - { - if (considered.Contains(subInterface)) continue; - - considered.Add(subInterface); - queue.Enqueue(subInterface); - } - - var typeProperties = subType.GetProperties( - BindingFlags.FlattenHierarchy - | BindingFlags.Public - | BindingFlags.NonPublic - | BindingFlags.Instance); - - var newPropertyInfos = typeProperties - .Where(x => !propertyInfos.Contains(x)); - - propertyInfos.InsertRange(0, newPropertyInfos); - } - - return propertyInfos.ToArray(); - } - - return type.GetProperties(BindingFlags.FlattenHierarchy - | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - } - - /// - /// Returns all public properties including inherited properties even for interfaces - /// - /// - /// - /// - /// taken from http://stackoverflow.com/questions/358835/getproperties-to-return-all-properties-for-an-interface-inheritance-hierarchy - /// - public static PropertyInfo[] GetPublicProperties(this Type type) - { - if (type.IsInterface) - { - var propertyInfos = new List(); - - var considered = new List(); - var queue = new Queue(); - considered.Add(type); - queue.Enqueue(type); - while (queue.Count > 0) - { - var subType = queue.Dequeue(); - foreach (var subInterface in subType.GetInterfaces()) - { - if (considered.Contains(subInterface)) continue; - - considered.Add(subInterface); - queue.Enqueue(subInterface); - } - - var typeProperties = subType.GetProperties( - BindingFlags.FlattenHierarchy - | BindingFlags.Public - | BindingFlags.Instance); - - var newPropertyInfos = typeProperties - .Where(x => !propertyInfos.Contains(x)); - - propertyInfos.InsertRange(0, newPropertyInfos); - } - - return propertyInfos.ToArray(); - } - - return type.GetProperties(BindingFlags.FlattenHierarchy - | BindingFlags.Public | BindingFlags.Instance); - } - - /// - /// Determines whether the specified actual type is type. - /// - /// - /// The actual type. - /// - /// true if the specified actual type is type; otherwise, false. - /// - public static bool IsType(this Type actualType) - { - return TypeHelper.IsTypeAssignableFrom(actualType); - } - - public static bool Inherits(this Type type) - { - return typeof (TBase).IsAssignableFrom(type); - } - - public static bool Inherits(this Type type, Type tbase) - { - return tbase.IsAssignableFrom(type); - } - - public static bool Implements(this Type type) - { - return typeof (TInterface).IsAssignableFrom(type); - } - - public static TAttribute FirstAttribute(this Type type) - { - return type.FirstAttribute(true); - } - - public static TAttribute FirstAttribute(this Type type, bool inherit) - { - var attrs = type.GetCustomAttributes(typeof(TAttribute), inherit); - return (TAttribute)(attrs.Length > 0 ? attrs[0] : null); - } - - public static TAttribute FirstAttribute(this PropertyInfo propertyInfo) - { - return propertyInfo.FirstAttribute(true); - } - - public static TAttribute FirstAttribute(this PropertyInfo propertyInfo, bool inherit) - { - var attrs = propertyInfo.GetCustomAttributes(typeof(TAttribute), inherit); - return (TAttribute)(attrs.Length > 0 ? attrs[0] : null); - } - - public static IEnumerable MultipleAttribute(this PropertyInfo propertyInfo) - { - return propertyInfo.MultipleAttribute(true); - } - - public static IEnumerable MultipleAttribute(this PropertyInfo propertyInfo, bool inherit) - { - var attrs = propertyInfo.GetCustomAttributes(typeof(TAttribute), inherit); - return (attrs.Length > 0 ? attrs.ToList().ConvertAll(input => (TAttribute)input) : null); - } - - /// - /// Returns the full type name with the assembly but without all of the assembly specific version information. - /// - /// - /// - /// - /// This method is like an 'in between' of Type.FullName and Type.AssemblyQualifiedName which returns the type and the assembly separated - /// by a comma. - /// - /// - /// The output of this class would be: - /// - /// Umbraco.Core.TypeExtensions, Umbraco.Core - /// - public static string GetFullNameWithAssembly(this Type type) - { - var assemblyName = type.Assembly.GetName(); - - return string.Concat(type.FullName, ", ", - assemblyName.FullName.StartsWith("App_Code.") ? "App_Code" : assemblyName.Name); - } - - /// - /// Determines whether an instance of a specified type can be assigned to the current type instance. - /// - /// The current type. - /// The type to compare with the current type. - /// A value indicating whether an instance of the specified type can be assigned to the current type instance. - /// This extended version supports the current type being a generic type definition, and will - /// consider that eg List{int} is "assignable to" IList{}. - public static bool IsAssignableFromGtd(this Type type, Type c) - { - // type *can* be a generic type definition - // c is a real type, cannot be a generic type definition - - if (type.IsGenericTypeDefinition == false) - return type.IsAssignableFrom(c); - - if (c.IsInterface == false) - { - var t = c; - while (t != typeof(object)) - { - if (t.IsGenericType && t.GetGenericTypeDefinition() == type) return true; - t = t.BaseType; - } - } - - return c.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == type); - } - - /// - /// If the given is an array or some other collection - /// comprised of 0 or more instances of a "subtype", get that type - /// - /// the source type - /// - internal static Type GetEnumeratedType(this Type type) - { - if (typeof(IEnumerable).IsAssignableFrom(type) == false) - return null; - - // provided by Array - var elType = type.GetElementType(); - if (null != elType) return elType; - - // otherwise provided by collection - var elTypes = type.GetGenericArguments(); - if (elTypes.Length > 0) return elTypes[0]; - - // otherwise is not an 'enumerated' type - return null; - } + } } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 10dc253789..cb70536a4a 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -132,13 +132,8 @@ - - - - - @@ -163,7 +158,6 @@ -