/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName() { if (DisplayName != null) { return(DisplayName.GetString()); } return(PropertyName.SplitPascalCase()); }
/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName(object model) { string result = null; if (DisplayName != null) { result = DisplayName.GetString(model); } if (result == null) { result = propertyDisplayName; } return(result); }
/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName() { string result = null; if (DisplayName != null) { result = DisplayName.GetString(null /*We don't have a model object at this point*/); } if (result == null) { result = propertyDisplayName; } return(result); }
/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName(IValidationContext context) { string result = null; if (DisplayName != null) { result = DisplayName.GetString(context); } if (result == null) { result = _propertyDisplayName; } return(result); }
/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName() { string result = null; if (DisplayName != null) { result = DisplayName.GetString(null); } if (result == null) { result = _propertyDisplayName; } return(result); }
/// <summary> /// Display name for the property. /// </summary> public string GetDisplayName() { string result = null; if (DisplayName != null) { result = DisplayName.GetString(); } if (result == null) { result = PropertyName.SplitPascalCase(); } return(result); }
private string BuildPropertyName(ValidationContext context) { return(context.PropertyChain.BuildPropertyName(PropertyName ?? DisplayName.GetString())); }