public RulesExceptionListContainer(RulesException rulesException) { IsRoot = true; PropertyName = rulesException.PropertyName; if (!string.IsNullOrEmpty(PropertyName)) { PropertyNameCamelCase = PropertyName.ToCamelCase(); } Index = rulesException.Index; }
public RulesExceptionListContainer(string key, KeyValuePair <string, List <object> > error, RulesException rulesException) { IsRoot = false; Key = key; PropertyName = rulesException.PropertyName; if (!string.IsNullOrEmpty(PropertyName)) { PropertyNameCamelCase = PropertyName.ToCamelCase(); } Index = rulesException.Index; Errors.Add(error.Key.ToCamelCase(), error.Value); }