diff --git a/.editorconfig b/.editorconfig index ff2bd6942f..83ba41d322 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,9 +4,13 @@ root = true indent_style = tab [*.csproj] -intent_style = space +indent_style = space indent_size = 2 +[*.cs] +indent_style = tab +indent_size = 4 + [{project,global}.json] indent_style = space indent_size = 2 \ No newline at end of file diff --git a/src/Castle.Core.Tests/TestDictionaryValidator.cs b/src/Castle.Core.Tests/TestDictionaryValidator.cs index 6911bfa38e..0fb89c6fa2 100644 --- a/src/Castle.Core.Tests/TestDictionaryValidator.cs +++ b/src/Castle.Core.Tests/TestDictionaryValidator.cs @@ -16,6 +16,7 @@ namespace Castle.Components.DictionaryAdapter.Tests { using System; using System.Collections.Generic; + using System.Linq; using Castle.Core.Internal; @@ -51,7 +52,7 @@ public string Validate(IDictionaryAdapter dictionaryAdapter) foreach (var property in dictionaryAdapter.This.Properties.Values) { - var propertyRules = AttributesUtil.GetAttributes(property.Property); + var propertyRules = AttributesUtil.GetAttributes(property.Property).Select(x => (IValidationRule)x); var propertyValue = dictionaryAdapter.GetProperty(property.PropertyName, true); ApplyValidationRules(dictionaryAdapter, propertyRules, property, propertyValue, errors); ApplyValidationRules(dictionaryAdapter, globalRules, property, propertyValue, errors); @@ -65,7 +66,7 @@ public string Validate(IDictionaryAdapter dictionaryAdapter, PropertyDescriptor List errors = new List(); var globalRules = AttributesUtil.GetTypeAttributes(dictionaryAdapter.Meta.Type); - var propertyRules = AttributesUtil.GetAttributes(property.Property); + var propertyRules = AttributesUtil.GetAttributes(property.Property).Select(x => (IValidationRule)x); var propertyValue = dictionaryAdapter.GetProperty(property.PropertyName, true); ApplyValidationRules(dictionaryAdapter, propertyRules, property, propertyValue, errors); ApplyValidationRules(dictionaryAdapter, globalRules, property, propertyValue, errors);