コード例 #1
0
        public void ValidateExternal(NamedTypeMetaInfo type, ITypeValidationProvider typeValidation, IDiagnosticReporter reporter)
        {
            var typeValidator = new FluentMemberValidator(TypeMetaSelection.Any(type), _conditionAnalyzer);

            typeValidation.ConfigureValidation(typeValidator);
            typeValidator.Validate(reporter);
        }
コード例 #2
0
        public void ValidateExternal(TypeMetaSelection selection, IGroupValidationProvider groupValidation, IDiagnosticReporter reporter)
        {
            var groupValidator = new FluentTypeValidator(selection, _conditionAnalyzer);

            groupValidation.ConfigureValidation(groupValidator);
            groupValidator.Validate(reporter);
        }
コード例 #3
0
        public FluentTypeValidator(TypeMetaSelection selection, ConditionAnalyzer conditionAnalyzer)
        {
            var type = selection.Type;

            _anyMembers      = new FluentMemberValidator(TypeMetaSelection.Any(type), conditionAnalyzer);
            _layoutMembers   = new FluentMemberValidator(selection, conditionAnalyzer);
            _excludedMembers = new FluentMemberValidator(selection.ReverseSelection(), conditionAnalyzer);
        }
コード例 #4
0
 public void Validate(TypeMetaSelection selection)
 {
     foreach (var typeValidation in _typeProviders)
     {
         ValidateExternal(selection.Type, typeValidation, _diagnostics);
     }
     foreach (var groupValidation in _groupProviders)
     {
         ValidateExternal(selection, groupValidation, _diagnostics);
     }
 }