protected string GetProperty(GenericContent content, string propertyName) { if (content == null) { return(string.Empty); } var value = content.GetProperty(propertyName); return(value == null ? string.Empty : value.ToString()); }
public static string GetProperty(GenericContent content, string propertyName) { if (content == null) { return(string.Empty); } if (string.IsNullOrEmpty(propertyName)) { return(content.Id.ToString()); } var value = content.GetProperty(propertyName); return(value == null ? string.Empty : value.ToString()); }
protected string GetProperty(GenericContent content, string propertyName) { //TODO: handle recursive property definitions - e.g. @@Node.Reference.FieldName@@ if (content == null) { return(string.Empty); } if (string.IsNullOrEmpty(propertyName)) { return(content.Id.ToString()); } var value = content.GetProperty(propertyName); return(value == null ? string.Empty : value.ToString()); }