/// <summary> /// Adds attributes to the quality level. /// </summary> /// <param name="reader">The xml reader.</param> /// <param name="qualityLevel">The quality level.</param> private static void AddAttributes(XmlReader reader, QualityLevel qualityLevel) { if (reader.HasAttributes && reader.MoveToFirstAttribute()) { do { qualityLevel.AddAttribute(reader.Name, reader.Value); }while (reader.MoveToNextAttribute()); reader.MoveToElement(); } }
/// <summary> /// Creates a clone instance of this QualityLevel object. /// </summary> /// <returns>A copy of the QualityLevel object.</returns> public QualityLevel Clone() { QualityLevel clone = new QualityLevel(); foreach (KeyValuePair <string, string> attributeValuePair in this.Attributes) { clone.AddAttribute(attributeValuePair.Key, attributeValuePair.Value); } foreach (KeyValuePair <string, string> customAttributeValuePair in this.CustomAttributes) { clone.AddCustomAttribute(customAttributeValuePair.Key, customAttributeValuePair.Value); } return(clone); }