Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've got an mistake here, intent vs indent. Looks like it is also wrong under csproj which I assumed you copy-pasted.


[{project,global}.json]
indent_style = space
indent_size = 2
5 changes: 3 additions & 2 deletions src/Castle.Core.Tests/TestDictionaryValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace Castle.Components.DictionaryAdapter.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;

using Castle.Core.Internal;

Expand Down Expand Up @@ -51,7 +52,7 @@ public string Validate(IDictionaryAdapter dictionaryAdapter)

foreach (var property in dictionaryAdapter.This.Properties.Values)
{
var propertyRules = AttributesUtil.GetAttributes<ValidationRuleAttribute>(property.Property);
var propertyRules = AttributesUtil.GetAttributes<ValidationRuleAttribute>(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);
Expand All @@ -65,7 +66,7 @@ public string Validate(IDictionaryAdapter dictionaryAdapter, PropertyDescriptor
List<String> errors = new List<string>();
var globalRules = AttributesUtil.GetTypeAttributes<ValidationRuleAttribute>(dictionaryAdapter.Meta.Type);

var propertyRules = AttributesUtil.GetAttributes<ValidationRuleAttribute>(property.Property);
var propertyRules = AttributesUtil.GetAttributes<ValidationRuleAttribute>(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);
Expand Down