Exemplo n.º 1
0
 public void StoreValidatorMethod(MethodInfo method, BaseMethodAttribute attribute)
 {
     if (_validatorMethods == null)
     {
         _validatorMethods = new Dictionary<string,MethodInfo>();
     }
     var methodName = ((ValidatorAttribute)attribute).MethodName;
     if (!_validatorMethods.Keys.Contains(methodName))
     {
         _validatorMethods.Add(methodName, method);
     }
     else
     {
         _warningHandler.DuplicatedValidatorsWarning(method, methodName);
     }
 }
Exemplo n.º 2
0
 public void MultipleAttributeTypesDontSupportedWarning(Type t, BaseMethodAttribute attribute)
 {
     var message = String.Format("Multiple attributes of type {0} are not allowed. Foud in container type {1}.", typeof(Attribute).ToString(), t.ToString());
     _warnings.Add(message);
 }
Exemplo n.º 3
0
 public void StoreTestMethod(MethodInfo method, BaseMethodAttribute attribute)
 {
     if (_testMethods == null)
     {
         _testMethods = new List<Tuple<MethodInfo, TestAttribute>>();
     }
     _testMethods.Add(Tuple.Create(method, (TestAttribute)attribute));
 }