Exemplo n.º 1
0
 private static ValidationResult GenerateValidationResult(AgentType agentType, string invalidPropertyName,
                                                          bool isRequired)
 {
     return(new ValidationResult(string.Format(
                                     (isRequired
             ? ErrorStrings.ResourceManager.GetString("AgentPropertyIsRequiredValidationError")
             : ErrorStrings.ResourceManager.GetString("AgentPropertyIsNotRequiredValidationError")),
                                     agentType.GetDisplayName(),
                                     typeof(AgentParams).GetProperty(invalidPropertyName).GetDisplayName())));
 }