public static FieldRef GetCamlFieldRef(this XElement xmlNode) { FieldRef fieldRef = new FieldRef(); fieldRef.Name = xmlNode.Attribute("Name").Value; fieldRef.DisplayName = xmlNode.Attribute("DisplayName") == null ? null : xmlNode.Attribute("DisplayName").Value; fieldRef.IsHidden = xmlNode.AttributeBoolOrFalse("Hidden"); fieldRef.IsReadOnly = xmlNode.AttributeBoolOrFalse("ReadOnly"); fieldRef.IsRequired = xmlNode.AttributeBoolOrFalse("Required"); return fieldRef; }
public static FieldRef GetCamlFieldRef(this XElement xmlNode) { FieldRef fieldRef = new FieldRef(); fieldRef.Name = xmlNode.Attribute("Name").Value; fieldRef.DisplayName = xmlNode.Attribute("DisplayName") == null ? null : xmlNode.Attribute("DisplayName").Value; fieldRef.IsHidden = xmlNode.AttributeBoolOrFalse("Hidden"); fieldRef.IsReadOnly = xmlNode.AttributeBoolOrFalse("ReadOnly"); fieldRef.IsRequired = xmlNode.AttributeBoolOrFalse("Required"); return(fieldRef); }