public static int GetAttributeAsInt32(this XElement element, string name) { var text = element.GetAttribute(name); if (string.IsNullOrEmpty(text) == true) { return(0); } return(CremaXmlConvert.ToInt32(text)); }
public static int GetAttributeAsInt32(this XmlReader reader, string name) { var text = reader.GetAttribute(name); if (string.IsNullOrEmpty(text) == true) { return(0); } return(CremaXmlConvert.ToInt32(text)); }