public XmlLiteAttribute[] ToArray() { XmlLiteAttribute[] arrAttributes = new XmlLiteAttribute[_objAttributes.Count]; _objAttributes.Values.CopyTo(arrAttributes, 0); return(arrAttributes); }
public void Add(XmlLiteAttribute objAttribute) { if (objAttribute == null) { throw new ArgumentNullException("objAttribute", "The attribute cannot be null."); } this[objAttribute.Name] = objAttribute; }
public XmlLiteAttribute Attribute(string strName) { if (strName == null) { throw new ArgumentNullException("strName", "The name cannot be null."); } XmlLiteAttribute objAttribute = this[strName]; return(objAttribute); }
public void Add(string strName, string strValue) { if (strName == null) { throw new ArgumentNullException("strName", "The name cannot be null."); } XmlLiteAttribute objAttribute = new XmlLiteAttribute(strName, strValue); this[strName] = objAttribute; }
public string GetValue(string strName, string strDefaultValue) { string strValue = strDefaultValue; XmlLiteAttribute objAttribute = this[strName]; if (objAttribute != null) { strValue = objAttribute.Value; } return(strValue); }
public XmlLiteAttribute this[string strName] { get { if (strName == null) { throw new ArgumentNullException("strName", "The name cannot be null."); } XmlLiteAttribute objAttribute = null; _objAttributes.TryGetValue(strName, out objAttribute); return(objAttribute); } set { if (value == null) { throw new ArgumentNullException("value", "The attribute cannot be null."); } _objAttributes[value.Name] = value; } }