Fisheye: Tag 35de88b42154ea1615b81903f20e2d7f4fa9f6ca refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Attributes/DisplayFormatAttribute.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 35de88b42154ea1615b81903f20e2d7f4fa9f6ca refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Attributes/DynamicEditorAttribute.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyAttribute.cs =================================================================== diff -u -rfa33f7c078c5d17f92f6a519f147a0a371593944 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyAttribute.cs (.../DynamicReadOnlyAttribute.cs) (revision fa33f7c078c5d17f92f6a519f147a0a371593944) +++ Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyAttribute.cs (.../DynamicReadOnlyAttribute.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -1,94 +1,69 @@ using System; -using System.Linq; -using System.Reflection; +using System.ComponentModel; -using Core.Common.Utils.Properties; +using CoreCommonUtilsResources = Core.Common.Utils.Properties.Resource; namespace Core.Common.Utils.Attributes { /// - /// Marks property as a conditional read-only property. When this attribute is used on a property - a class containing that property - /// must contain a single validation method (argument propertyName as string, returns bool) marked using [DynamicReadOnlyValidationMethod] - /// attribute. + /// Marks property as a conditional read-only property. When this attribute is declared + /// on a property, the declaring a class should have a public method marked with + /// to be used to evaluate if + /// that property should be read-only or not. /// + /// + /// + /// This attribute provides a run-time alternative to . + [AttributeUsage(AttributeTargets.Property)] public class DynamicReadOnlyAttribute : Attribute { + /// + /// Determines whether the property is read-only or not. + /// + /// The object. + /// Name of the property of . + /// True if the property is read-only, false otherwise. + /// + /// does not correspond to a public property of . + /// When there isn't a single method + /// declared on marked with + /// and/or isn't matching the signature defined by . public static bool IsDynamicReadOnly(object obj, string propertyName) { if (string.IsNullOrEmpty(propertyName)) { return false; } - // todo: caching!!!! - var propertyInfo = obj.GetType().GetProperty(propertyName); - if (propertyInfo == null) + var isDynamicReadOnlyProperty = PropertyIsDynamicallyReadOnly(obj, propertyName); + if (!isDynamicReadOnlyProperty) { - throw new MissingMemberException(string.Format(Resource.Could_not_find_property_0_on_type_1_, propertyName, - obj.GetType())); - } - - if (!propertyInfo.GetCustomAttributes(typeof(DynamicReadOnlyAttribute), false).Any()) - { return false; } - var validationMethod = GetDynamicReadOnlyValidationMethod(obj); + var isPropertyReadOnlyDelegate = DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(obj); - // check if property should be read-only - if (validationMethod == null) - { - throw new MissingMethodException( - String.Format(Resource.DynamicReadOnlyAttribute_IsDynamicReadOnly_0_uses_DynanamicReadOnlyAttribute_but_does_not_have_method_marked_using_DynamicReadOnlyValidationMethodAttribute, obj)); - } - - var shouldBeReadOnly = (bool) validationMethod.Invoke(obj, new[] - { - propertyName - }); - - return shouldBeReadOnly; + return isPropertyReadOnlyDelegate(propertyName); } - private static MethodInfo GetDynamicReadOnlyValidationMethod(object o) + /// + /// Determines if an object's property is marked with . + /// + /// The object. + /// Name of the property. + /// True if the attribute is defined, false otherwise. + /// + /// does not correspond to a public property of . + private static bool PropertyIsDynamicallyReadOnly(object obj, string propertyName) { - var type = o.GetType(); - - var validationMethods = - type.GetMethods().Where( - methodInfo => - methodInfo.GetCustomAttributes(false).Any(a => a is DynamicReadOnlyValidationMethodAttribute)). - ToList(); - - if (!validationMethods.Any()) + var propertyInfo = obj.GetType().GetProperty(propertyName); + if (propertyInfo == null) { - throw new MissingMethodException(string.Format(Resource.DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_not_found_or_not_public_class_0_, type)); + throw new MissingMemberException(string.Format(CoreCommonUtilsResources.Could_not_find_property_0_on_type_1_, propertyName, + obj.GetType())); } - if (validationMethods.Count() > 1) - { - throw new MissingMethodException(string.Format(Resource.DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_Only_one_DynamicReadOnlyValidationMethod_is_allowed_per_class_0_, type)); - } - - var validationMethod = validationMethods.First(); - - // check return type and arguments - if (validationMethod.ReturnType != typeof(bool)) - { - throw new MissingMethodException(string.Format(Resource.DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_must_use_bool_as_a_return_type_class_0_, type)); - } - - if (validationMethod.GetParameters().Length != 1) - { - throw new MissingMethodException(string.Format(Resource.DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_has_incorrect_number_of_arguments_Should_be_1_of_type_string_class_0_, type)); - } - - if (validationMethod.GetParameters()[0].ParameterType != typeof(string)) - { - throw new MissingMethodException(string.Format(Resource.DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_has_incorrect_argument_type_Should_be_of_type_string_class_0_, type)); - } - - return validationMethod; + return IsDefined(propertyInfo, typeof(DynamicReadOnlyAttribute)); } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyValidationMethodAttribute.cs =================================================================== diff -u -rfa33f7c078c5d17f92f6a519f147a0a371593944 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyValidationMethodAttribute.cs (.../DynamicReadOnlyValidationMethodAttribute.cs) (revision fa33f7c078c5d17f92f6a519f147a0a371593944) +++ Core/Common/src/Core.Common.Utils/Attributes/DynamicReadOnlyValidationMethodAttribute.cs (.../DynamicReadOnlyValidationMethodAttribute.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -1,11 +1,91 @@ using System; +using System.Linq; +using System.Reflection; +using CoreCommonUtilsResources = Core.Common.Utils.Properties.Resource; + namespace Core.Common.Utils.Attributes { /// - /// Used to mark method as a validation method used to check if property value can be set. - /// The method should be in the format: bool IsReadOnly(string propertyName) - /// + /// Marks a method to be used to determine if a property value can be set or not. The + /// method should be public and have the signature of . /// - public class DynamicReadOnlyValidationMethodAttribute : Attribute {} + /// + public class DynamicReadOnlyValidationMethodAttribute : Attribute + { + /// + /// Required method signature when marking a method with . + /// + /// Name of the property to be checked. + /// True if the referred property should be read-only, false if it should be editable. + public delegate bool IsPropertyReadOnly(string propertyName); + + /// + /// Creates a delegate that can be used to determine if a property should be read-only. + /// + /// The object instance declaring the validation method. + /// The delegate. + /// When there isn't a single method + /// declared on marked with + /// and/or isn't matching the signature defined by . + public static IsPropertyReadOnly CreateIsReadOnlyMethod(object target) + { + var methodInfo = GetIsReadOnlyMethod(target); + ValidateMethodInfo(methodInfo); + return CreateIsPropertyReadOnlyDelegate(target, methodInfo); + } + + private static IsPropertyReadOnly CreateIsPropertyReadOnlyDelegate(object target, MethodInfo methodInfo) + { + return (IsPropertyReadOnly) Delegate.CreateDelegate(typeof(IsPropertyReadOnly), target, methodInfo); + } + + private static void ValidateMethodInfo(MethodInfo methodInfo) + { + if (methodInfo.ReturnType != typeof(bool)) + { + var message = String.Format(CoreCommonUtilsResources.DynamicReadOnlyValidationMethod_must_return_bool_on_Class_0_, + methodInfo.DeclaringType); + throw new MissingMethodException(message); + } + + ParameterInfo[] parameterInfos = methodInfo.GetParameters(); + if (parameterInfos.Length != 1) + { + var message = String.Format(CoreCommonUtilsResources.DynamicReadOnlyValidationMethod_incorrect_argument_count_must_be_one_string_argument_on_Class_0_, + methodInfo.DeclaringType); + throw new MissingMethodException(message); + } + + if (parameterInfos[0].ParameterType != typeof(string)) + { + var message = String.Format(CoreCommonUtilsResources.DynamicReadOnlyValidationMethod_must_have_string_argument_on_Class_0_, + methodInfo.DeclaringType); + throw new MissingMethodException(message); + } + } + + private static MethodInfo GetIsReadOnlyMethod(object obj) + { + var validationMethods = obj.GetType().GetMethods() + .Where(methodInfo => IsDefined(methodInfo, typeof(DynamicReadOnlyValidationMethodAttribute))) + .ToArray(); + + if (validationMethods.Length == 0) + { + var message = String.Format(CoreCommonUtilsResources.DynamicReadOnlyValidationMethod_not_found_or_not_public_on_Class_0_, + obj.GetType()); + throw new MissingMethodException(message); + } + + if (validationMethods.Length > 1) + { + var message = String.Format(CoreCommonUtilsResources.DynamicReadOnlyValidationMethod_only_one_allowed_per_Class_0_, + obj.GetType()); + throw new MissingMethodException(message); + } + + return validationMethods[0]; + } + } } \ No newline at end of file Index: Core/Common/src/Core.Common.Utils/Attributes/ResourceHelper.cs =================================================================== diff -u -r10b304d4b5cb2283801cdb16204baf2a42ab5967 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Attributes/ResourceHelper.cs (.../ResourceHelper.cs) (revision 10b304d4b5cb2283801cdb16204baf2a42ab5967) +++ Core/Common/src/Core.Common.Utils/Attributes/ResourceHelper.cs (.../ResourceHelper.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -8,15 +8,15 @@ /// /// Helper method for interacting with . /// - public static class ResourceHelper + internal static class ResourceHelper { /// /// Retrieve the string resource with the given name. /// /// Type of the resource file. /// Name of the resource property to be retrieved. /// String resource in the resources file. - public static string GetResourceLookup(Type resourceType, string resourceName) + internal static string GetResourceLookup(Type resourceType, string resourceName) { if ((resourceType != null) && (resourceName != null)) { Index: Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj =================================================================== diff -u -re95dbee6ea6b002476a7827a03f6584b779ad594 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj (.../Core.Common.Utils.csproj) (revision e95dbee6ea6b002476a7827a03f6584b779ad594) +++ Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj (.../Core.Common.Utils.csproj) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -88,8 +88,6 @@ Properties\GlobalAssembly.cs - - Index: Core/Common/src/Core.Common.Utils/Properties/Resource.Designer.cs =================================================================== diff -u -r10b304d4b5cb2283801cdb16204baf2a42ab5967 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Properties/Resource.Designer.cs (.../Resource.Designer.cs) (revision 10b304d4b5cb2283801cdb16204baf2a42ab5967) +++ Core/Common/src/Core.Common.Utils/Properties/Resource.Designer.cs (.../Resource.Designer.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -80,67 +80,52 @@ } /// - /// Looks up a localized string similar to Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0}. + /// Looks up a localized string similar to DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0}.. /// - internal static string DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_has_incorrect_argument_type_Should_be_of_type_string_class_0_ { + internal static string DynamicReadOnlyValidationMethod_incorrect_argument_count_must_be_one_string_argument_on_Class_0_ { get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValida" + - "tionMethod_has_incorrect_argument_type_Should_be_of_type_string_class_0_", resourceCulture); + return ResourceManager.GetString("DynamicReadOnlyValidationMethod_incorrect_argument_count_must_be_one_string_argum" + + "ent_on_Class_0_", resourceCulture); } } /// - /// Looks up a localized string similar to DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0}. + /// Looks up a localized string similar to Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0}.. /// - internal static string DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_has_incorrect_number_of_arguments_Should_be_1_of_type_string_class_0_ { + internal static string DynamicReadOnlyValidationMethod_must_have_string_argument_on_Class_0_ { get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValida" + - "tionMethod_has_incorrect_number_of_arguments_Should_be_1_of_type_string_class_0_" + - "", resourceCulture); + return ResourceManager.GetString("DynamicReadOnlyValidationMethod_must_have_string_argument_on_Class_0_", resourceCulture); } } /// - /// Looks up a localized string similar to DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0}. + /// Looks up a localized string similar to DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0}.. /// - internal static string DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_must_use_bool_as_a_return_type_class_0_ { + internal static string DynamicReadOnlyValidationMethod_must_return_bool_on_Class_0_ { get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValida" + - "tionMethod_must_use_bool_as_a_return_type_class_0_", resourceCulture); + return ResourceManager.GetString("DynamicReadOnlyValidationMethod_must_return_bool_on_Class_0_", resourceCulture); } } /// - /// Looks up a localized string similar to DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0}. + /// Looks up a localized string similar to DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0}.. /// - internal static string DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValidationMethod_not_found_or_not_public_class_0_ { + internal static string DynamicReadOnlyValidationMethod_not_found_or_not_public_on_Class_0_ { get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_DynamicReadOnlyValida" + - "tionMethod_not_found_or_not_public_class_0_", resourceCulture); + return ResourceManager.GetString("DynamicReadOnlyValidationMethod_not_found_or_not_public_on_Class_0_", resourceCulture); } } /// /// Looks up a localized string similar to Slechts één DynamicReadOnlyValidationMethod toegestaan per klasse: {0}.. /// - internal static string DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_Only_one_DynamicReadOnlyValidationMethod_is_allowed_per_class_0_ { + internal static string DynamicReadOnlyValidationMethod_only_one_allowed_per_Class_0_ { get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_GetDynamicReadOnlyValidationMethod_Only_one_DynamicReadO" + - "nlyValidationMethod_is_allowed_per_class_0_", resourceCulture); + return ResourceManager.GetString("DynamicReadOnlyValidationMethod_only_one_allowed_per_Class_0_", resourceCulture); } } /// - /// Looks up a localized string similar to {0} gebruikt DynanamicReadOnlyAttribute, maar heeft geen methode gemarkeerd met DynamicReadOnlyValidationMethodAttribute.. - /// - internal static string DynamicReadOnlyAttribute_IsDynamicReadOnly_0_uses_DynanamicReadOnlyAttribute_but_does_not_have_method_marked_using_DynamicReadOnlyValidationMethodAttribute { - get { - return ResourceManager.GetString("DynamicReadOnlyAttribute_IsDynamicReadOnly_0_uses_DynanamicReadOnlyAttribute_but_" + - "does_not_have_method_marked_using_DynamicReadOnlyValidationMethodAttribute", resourceCulture); - } - } - - /// /// Looks up a localized string similar to {0} gebruikt DynamicVisibleAttribute, maar heeft geen methode gemarkeerd met DynamicVisibleValidationMethodAttribute.. /// internal static string DynamicVisibleAttribute_IsDynamicVisible_0_uses_DynamicVisibleAttribute_but_does_not_have_method_marked_using_DynamicVisibleValidationMethodAttribute { Index: Core/Common/src/Core.Common.Utils/Properties/Resource.resx =================================================================== diff -u -r10b304d4b5cb2283801cdb16204baf2a42ab5967 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/Properties/Resource.resx (.../Resource.resx) (revision 10b304d4b5cb2283801cdb16204baf2a42ab5967) +++ Core/Common/src/Core.Common.Utils/Properties/Resource.resx (.../Resource.resx) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -126,23 +126,20 @@ Thread synchronisatiefout (aanroep {1}): {0} - - {0} gebruikt DynanamicReadOnlyAttribute, maar heeft geen methode gemarkeerd met DynamicReadOnlyValidationMethodAttribute. + + DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0}. - - DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0} - - + Slechts één DynamicReadOnlyValidationMethod toegestaan per klasse: {0}. - - DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0} + + DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0}. - - DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0} + + DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0}. - - Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0} + + Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0}. Kon eigenschap {0} van type {1} niet vinden. Index: Core/Common/src/Core.Common.Utils/PropertyBag/DynamicPropertyBag.cs =================================================================== diff -u -re95dbee6ea6b002476a7827a03f6584b779ad594 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/src/Core.Common.Utils/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision e95dbee6ea6b002476a7827a03f6584b779ad594) +++ Core/Common/src/Core.Common.Utils/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -49,10 +49,6 @@ var attributeList = new List(); attributeList.AddRange(propertySpec.Attributes.ToList()); - var setToReadOnly = false; - EditorAttribute editorAttribute = null; - DynamicEditorAttribute dynamicEditorAttribute = null; - //check all of the attributes: if we find a dynamic one, evaluate it and possibly add/overwrite a static attribute foreach (Attribute customAttribute in propertySpec.Attributes) { @@ -64,7 +60,6 @@ { //condition is true: the dynamic attribute should be applied (as static attribute) attributeList.Add(new ReadOnlyAttribute(true)); //add static read only attribute - setToReadOnly = true; } } @@ -77,37 +72,8 @@ attributeList.Add(new BrowsableAttribute(false)); } } - - if (customAttribute is EditorAttribute) - { - editorAttribute = customAttribute as EditorAttribute; - } - if (customAttribute is DynamicEditorAttribute) - { - dynamicEditorAttribute = customAttribute as DynamicEditorAttribute; - } } - if (setToReadOnly && editorAttribute != null) - { - // translate EditorAttribute into DynamicEditorAttribute (since the property is readonly) - attributeList.RemoveAll(x => x is EditorAttribute); - attributeList.Add(new DynamicEditorAttribute(editorAttribute.EditorTypeName, editorAttribute.EditorBaseTypeName)); - } - if (!setToReadOnly && dynamicEditorAttribute != null) - { - // translate DynamicEditorAttribute into regular EditorAttribute (since the property is NOT readonly) - attributeList.RemoveAll(x => x is DynamicEditorAttribute); - try - { - attributeList.Add(new EditorAttribute(Type.GetType(dynamicEditorAttribute.EditorType, true), Type.GetType(dynamicEditorAttribute.EditorBaseType, true))); - } - catch (Exception) - { - // nothing we can do about it - } - } - propertySpec.Attributes = attributeList.ToArray(); var propertyInfo = WrappedObject.GetType().GetProperty(propertySpec.Name); Fisheye: Tag 35de88b42154ea1615b81903f20e2d7f4fa9f6ca refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Utils.Test/Attributes/ComparableExtensionsTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyAttributeTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyAttributeTest.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyAttributeTest.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,157 @@ +using System; + +using Core.Common.Utils.Attributes; +using Core.Common.Utils.Test.Attributes.TestCaseClasses; + +using NUnit.Framework; + +namespace Core.Common.Utils.Test.Attributes +{ + [TestFixture] + public class DynamicReadOnlyAttributeTest + { + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var attribute = new DynamicReadOnlyAttribute(); + + // Assert + Assert.IsInstanceOf(attribute); + } + + [Test] + [TestCase("")] + [TestCase(null)] + public void IsDynamicReadOnly_NoPropertyName_ReturnFalse(string propertyName) + { + // Call + var isReadOnly = DynamicReadOnlyAttribute.IsDynamicReadOnly(new object(), propertyName); + + // Assert + Assert.IsFalse(isReadOnly); + } + + [Test] + public void IsDynamicReadOnly_GivenPropertyNameDoesNotExistOnObject_ThrowMissingMemberException() + { + // Setup + var o = new object(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "NotExistingProperty"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + Assert.AreEqual(string.Format("Kon eigenschap NotExistingProperty van type {0} niet vinden.", o.GetType()), exceptionMessage); + } + + [Test] + public void IsDynamicReadOnly_GivenPropertyDoesNotHaveDynamicReadOnlyAttribute_ReturnFalse() + { + // Setup + var o = new ClassWithPropertyWithoutDynamicReadOnlyAttribute(); + + // Call + var isReadOnly = DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + Assert.IsFalse(isReadOnly); + } + + [Test] + public void IsDynamicReadOnly_ClassLacksDynamicReadOnlyValidationMethod_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButNoValidationMethod(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void IsDynamicReadOnly_ClassHasMultipleDynamicReadOnlyValidationMethods_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyAndMultipleValidationMethod(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("Slechts één DynamicReadOnlyValidationMethod toegestaan per klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void IsDynamicReadOnly_ClassHasDynamicReadOnlyValidationMethodWithNonBoolReturnType_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodReturnsIncorrectValueType(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void IsDynamicReadOnly_ClassHasDynamicReadOnlyValidationMethodWithIncorrectArgumentCount_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodNotOneArgument(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void IsDynamicReadOnly_ClassHasDynamicReadOnlyValidationMethodWithIncorrectArgumentType_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodArgumentNotString(); + + // Call + TestDelegate call = () => DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + [TestCase(false)] + [TestCase(true)] + public void IsDynamicReadOnly_ClassWithDynamicReadOnlyProperty_ReturnResultFromValidationMethod(bool isReadOnly) + { + // Setup + var o = new ClassWithDynamicReadOnlyProperty(isReadOnly); + + // Call + var result = DynamicReadOnlyAttribute.IsDynamicReadOnly(o, "Property"); + + // Assert + Assert.AreEqual(isReadOnly, result); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Attributes/DynamicReadOnlyValidationMethodAttributeTest.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,108 @@ +using System; + +using Core.Common.Utils.Attributes; +using Core.Common.Utils.Test.Attributes.TestCaseClasses; + +using NUnit.Framework; + +namespace Core.Common.Utils.Test.Attributes +{ + [TestFixture] + public class DynamicReadOnlyValidationMethodAttributeTest + { + [Test] + public void CreateIsReadOnlyMethod_ClassLacksDynamicReadOnlyValidationMethod_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButNoValidationMethod(); + + // Call + TestDelegate call = () => DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void CreateIsReadOnlyMethod_ClassHasMultipleDynamicReadOnlyValidationMethods_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyAndMultipleValidationMethod(); + + // Call + TestDelegate call = () => DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("Slechts één DynamicReadOnlyValidationMethod toegestaan per klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void CreateIsReadOnlyMethod_ClassHasDynamicReadOnlyValidationMethodWithNonBoolReturnType_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodReturnsIncorrectValueType(); + + // Call + TestDelegate call = () => DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod moet 'bool' als 'return type' hebben. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void CreateIsReadOnlyMethod_ClassHasDynamicReadOnlyValidationMethodWithIncorrectArgumentCount_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodNotOneArgument(); + + // Call + TestDelegate call = () => DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + public void CreateIsReadOnlyMethod_ClassHasDynamicReadOnlyValidationMethodWithIncorrectArgumentType_ThrowsMissingMethodException() + { + // Setup + var o = new InvalidClassWithDynamicReadOnlyPropertyButValidationMethodArgumentNotString(); + + // Call + TestDelegate call = () => DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + var exceptionMessage = Assert.Throws(call).Message; + var expectedMessage = string.Format("Argument van DynamicReadOnlyValidationMethod moet van het type 'string' zijn. Klasse: {0}.", + o.GetType()); + Assert.AreEqual(expectedMessage, exceptionMessage); + } + + [Test] + [TestCase(false)] + [TestCase(true)] + public void CreateIsReadOnlyMethod_ClassWithDynamicReadOnlyProperty_ReturnResultFromValidationMethod(bool isReadOnly) + { + // Setup + var o = new ClassWithDynamicReadOnlyProperty(isReadOnly); + + // Call + var result = DynamicReadOnlyValidationMethodAttribute.CreateIsReadOnlyMethod(o); + + // Assert + Assert.AreEqual(isReadOnly, result("Property")); + } + } +} \ No newline at end of file Fisheye: Tag 35de88b42154ea1615b81903f20e2d7f4fa9f6ca refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Utils.Test/Attributes/EnumerableExtensionsTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 35de88b42154ea1615b81903f20e2d7f4fa9f6ca refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Utils.Test/Attributes/StringExtensionsTests.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Utils.Test/Attributes/TestCaseClasses/DynamicReadOnlyTestCases.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Attributes/TestCaseClasses/DynamicReadOnlyTestCases.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Attributes/TestCaseClasses/DynamicReadOnlyTestCases.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,88 @@ +using Core.Common.Utils.Attributes; + +namespace Core.Common.Utils.Test.Attributes.TestCaseClasses +{ + internal class ClassWithPropertyWithoutDynamicReadOnlyAttribute + { + public double Property { get; set; } + } + + internal class InvalidClassWithDynamicReadOnlyPropertyButNoValidationMethod + { + [DynamicReadOnly] + public double Property { get; set; } + } + + internal class InvalidClassWithDynamicReadOnlyPropertyAndMultipleValidationMethod + { + [DynamicReadOnly] + public double Property { get; set; } + + [DynamicReadOnlyValidationMethod] + public bool IsDynamicReadOnly1(string propertyName) + { + return true; + } + + [DynamicReadOnlyValidationMethod] + public bool IsDynamicReadOnly2(string propertyName) + { + return false; + } + } + + internal class InvalidClassWithDynamicReadOnlyPropertyButValidationMethodReturnsIncorrectValueType + { + [DynamicReadOnly] + public double Property { get; set; } + + [DynamicReadOnlyValidationMethod] + public int IsDynamicReadOnly(string propertyName) + { + return 0; + } + } + + internal class InvalidClassWithDynamicReadOnlyPropertyButValidationMethodNotOneArgument + { + [DynamicReadOnly] + public double Property { get; set; } + + [DynamicReadOnlyValidationMethod] + public bool IsDynamicReadOnly(object o, string propertyName) + { + return true; + } + } + + internal class InvalidClassWithDynamicReadOnlyPropertyButValidationMethodArgumentNotString + { + [DynamicReadOnly] + public double Property { get; set; } + + [DynamicReadOnlyValidationMethod] + public bool IsDynamicReadOnly(object o) + { + return true; + } + } + + internal class ClassWithDynamicReadOnlyProperty + { + private readonly bool isReadOnly; + + public ClassWithDynamicReadOnlyProperty(bool isReadOnly) + { + this.isReadOnly = isReadOnly; + } + + [DynamicReadOnly] + public double Property { get; set; } + + [DynamicReadOnlyValidationMethod] + public bool IsDynamicReadOnly(string propertyName) + { + return isReadOnly; + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Core.Common.Utils.Test.csproj =================================================================== diff -u -re95dbee6ea6b002476a7827a03f6584b779ad594 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/test/Core.Common.Utils.Test/Core.Common.Utils.Test.csproj (.../Core.Common.Utils.Test.csproj) (revision e95dbee6ea6b002476a7827a03f6584b779ad594) +++ Core/Common/test/Core.Common.Utils.Test/Core.Common.Utils.Test.csproj (.../Core.Common.Utils.Test.csproj) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -87,9 +87,12 @@ - - - + + + + + + Index: Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/ComparableExtensionsTest.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,40 @@ +using System; + +using Core.Common.Utils.Extensions; + +using NUnit.Framework; + +namespace Core.Common.Utils.Test.Extensions +{ + [TestFixture] + public class ComparableExtensionsTest + { + [Test] + public void NullIsSmallerThanAnything() + { + IComparable b = null; + Assert.IsTrue(b.IsSmaller("anything")); + } + + [Test] + public void NullIsNotSmallerThanNull() + { + IComparable b = null; + Assert.IsFalse(b.IsSmaller(null)); + } + + [Test] + public void NullIsNotBiggerThanAnything() + { + IComparable b = null; + Assert.IsFalse(b.IsBigger("anything")); + } + + [Test] + public void NullIsNotBiggerThanNull() + { + IComparable b = null; + Assert.IsFalse(b.IsBigger((null))); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,41 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +using Core.Common.Utils.Extensions; + +using NUnit.Framework; + +namespace Core.Common.Utils.Test.Extensions +{ + [TestFixture] + public class EnumerableExtensionsTest + { + [Test] + public void ForEach() + { + var items = new[] + { + 1, + 2, + 3 + }; + + var results = new List(); + + items.ForEachElementDo(results.Add); + + CollectionAssert.AreEqual(items, results, "elements should be equal"); + } + + [Test] + public void Count_ForRandomRange_ReturnsRangeElementCount() + { + var expectedCount = new Random().Next(100); + IEnumerable enumerable = Enumerable.Range(1, expectedCount); + + Assert.AreEqual(expectedCount, enumerable.Count()); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Extensions/StringExtensionsTests.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Utils.Test/Extensions/StringExtensionsTests.cs (revision 0) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/StringExtensionsTests.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,39 @@ +using System; +using System.Globalization; + +using Core.Common.Utils.Extensions; + +using NUnit.Framework; + +namespace Core.Common.Utils.Test.Extensions +{ + [TestFixture] + public class StringExtensionsTests + { + [Test] + public void Parse() + { + Assert.AreEqual(12.34, "12.34".Parse(CultureInfo.GetCultureInfo("nl-NL"))); + + Assert.AreEqual(1234, "1234".Parse()); + + Assert.AreEqual(0, "asdf".Parse()); // i.e. default(int) + + Assert.AreEqual(1234, "1234".Parse()); + + Assert.IsNull("asdf".Parse()); + + Assert.AreEqual(new DateTime(2001, 2, 3), "2001-02-03".Parse()); + } + + [Test] + public void ReplaceFirst() + { + const string text = "Lorem ipsum lorem ipsum"; + + Assert.AreEqual("Lorem test lorem ipsum", text.ReplaceFirst("ipsum", "test")); + Assert.AreEqual("Lorem test lorem test", text.ReplaceFirst("ipsum", "test").ReplaceFirst("ipsum", "test")); + Assert.AreEqual("Lorem test lorem test", text.ReplaceFirst("ipsum", "test").ReplaceFirst("ipsum", "test").ReplaceFirst("ipsum", "test")); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/PropertyBag/DynamicPropertyBagTest.cs =================================================================== diff -u -re95dbee6ea6b002476a7827a03f6584b779ad594 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Common/test/Core.Common.Utils.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision e95dbee6ea6b002476a7827a03f6584b779ad594) +++ Core/Common/test/Core.Common.Utils.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -116,7 +116,7 @@ } [Test] - [ExpectedException(typeof(MissingMethodException), ExpectedMessage = "DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: Core.Common.Utils.Test.PropertyBag.DynamicPropertyBagTest+TestWithoutValidationMethodClassProperties")] + [ExpectedException(typeof(MissingMethodException), ExpectedMessage = "DynamicReadOnlyValidationMethod niet gevonden (of geen 'public' toegankelijkheid). Klasse: Core.Common.Utils.Test.PropertyBag.DynamicPropertyBagTest+TestWithoutValidationMethodClassProperties.")] public void ThrowsExceptionOnTypoInDynamicAttributeFunction() { var dynamicPropertyBag = new DynamicPropertyBag(new TestWithoutValidationMethodClassProperties()); @@ -179,7 +179,7 @@ } [Test] - [ExpectedException(typeof(MissingMethodException), ExpectedMessage = "DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: Core.Common.Utils.Test.PropertyBag.DynamicPropertyBagTest+TestInvalidValidationMethodClassProperties")] + [ExpectedException(typeof(MissingMethodException), ExpectedMessage = "DynamicReadOnlyValidationMethod heeft een incorrect aantal argumenten. Zou er één moeten zijn. Klasse: Core.Common.Utils.Test.PropertyBag.DynamicPropertyBagTest+TestInvalidValidationMethodClassProperties.")] public void ThrowsExceptionOnInvalidValidationMethod() { var dynamicPropertyBag = new DynamicPropertyBag(new TestInvalidValidationMethodClassProperties()); Index: Core/GIS/src/Core.GIS.GeoAPI/Attributes/DisplayFormatAttribute.cs =================================================================== diff -u --- Core/GIS/src/Core.GIS.GeoAPI/Attributes/DisplayFormatAttribute.cs (revision 0) +++ Core/GIS/src/Core.GIS.GeoAPI/Attributes/DisplayFormatAttribute.cs (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -0,0 +1,15 @@ +using System; + +namespace Core.GIS.GeoAPI.Attributes +{ + [AttributeUsage(AttributeTargets.Property)] + public class DisplayFormatAttribute : Attribute + { + public DisplayFormatAttribute(string formatString) + { + FormatString = formatString; + } + + public string FormatString { get; private set; } + } +} \ No newline at end of file Index: Core/GIS/src/Core.GIS.GeoAPI/Core.GIS.GeoAPI.csproj =================================================================== diff -u -r3f1a2b8718a744b49b160c89df46dee6b7fb5fdd -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/GIS/src/Core.GIS.GeoAPI/Core.GIS.GeoAPI.csproj (.../Core.GIS.GeoAPI.csproj) (revision 3f1a2b8718a744b49b160c89df46dee6b7fb5fdd) +++ Core/GIS/src/Core.GIS.GeoAPI/Core.GIS.GeoAPI.csproj (.../Core.GIS.GeoAPI.csproj) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -1,4 +1,4 @@ - + @@ -79,6 +79,7 @@ + Index: Core/GIS/src/Core.GIS.NetTopologySuite.Extensions/Features/FeatureAttributeAccessorHelper.cs =================================================================== diff -u -rfa33f7c078c5d17f92f6a519f147a0a371593944 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/GIS/src/Core.GIS.NetTopologySuite.Extensions/Features/FeatureAttributeAccessorHelper.cs (.../FeatureAttributeAccessorHelper.cs) (revision fa33f7c078c5d17f92f6a519f147a0a371593944) +++ Core/GIS/src/Core.GIS.NetTopologySuite.Extensions/Features/FeatureAttributeAccessorHelper.cs (.../FeatureAttributeAccessorHelper.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -5,9 +5,8 @@ using System.Globalization; using System.Linq; using System.Reflection; -using Core.Common.Utils; -using Core.Common.Utils.Attributes; using Core.Common.Utils.Reflection; +using Core.GIS.GeoAPI.Attributes; using Core.GIS.GeoAPI.Extensions.Feature; namespace Core.GIS.NetTopologySuite.Extensions.Features Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/VectorLayerAttributeTableView.cs =================================================================== diff -u -r46f5191a65faec434930a191e65f4c23d9ff8cfe -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/VectorLayerAttributeTableView.cs (.../VectorLayerAttributeTableView.cs) (revision 46f5191a65faec434930a191e65f4c23d9ff8cfe) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/VectorLayerAttributeTableView.cs (.../VectorLayerAttributeTableView.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -10,6 +10,7 @@ using Core.Common.Utils.Attributes; using Core.Common.Utils.Events; using Core.Common.Utils.Reflection; +using Core.GIS.GeoAPI.Attributes; using Core.GIS.GeoAPI.Extensions.Feature; using Core.GIS.NetTopologySuite.Extensions.Features; using Core.GIS.SharpMap.Api.Collections; Index: Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/VectorLayerAttributeTableViewTest.cs =================================================================== diff -u -rfa33f7c078c5d17f92f6a519f147a0a371593944 -r35de88b42154ea1615b81903f20e2d7f4fa9f6ca --- Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/VectorLayerAttributeTableViewTest.cs (.../VectorLayerAttributeTableViewTest.cs) (revision fa33f7c078c5d17f92f6a519f147a0a371593944) +++ Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/VectorLayerAttributeTableViewTest.cs (.../VectorLayerAttributeTableViewTest.cs) (revision 35de88b42154ea1615b81903f20e2d7f4fa9f6ca) @@ -2,6 +2,7 @@ using System.Collections.Generic; using Core.Common.Utils; using Core.Common.Utils.Attributes; +using Core.GIS.GeoAPI.Attributes; using Core.GIS.GeoAPI.Extensions.Feature; using Core.GIS.NetTopologySuite.Extensions.Features; using Core.GIS.NetTopologySuite.Geometries;