private void SetDotvvmNameToProperty(Type type, string propertyName, Schema targetSchema) { var propertyInfo = type.GetProperty(propertyName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static); if (propertyInfo != null) { targetSchema.Extensions.Add(ApiConstants.DotvvmNameKey, propertySerialization.ResolveName(propertyInfo)); } }
private string GetPropertyName(Type type, string propertyName) { var propertyInfo = type.GetProperty(propertyName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static); if (propertyInfo == null) { return(propertyName); } return(propertySerialization.ResolveName(propertyInfo)); }