/// <summary> /// Adds attributes to the stream info. /// </summary> /// <param name="reader">The xml reader.</param> /// <param name="streamInfo">The stream info.</param> private static void AddAttributes(XmlReader reader, StreamInfo streamInfo) { if (reader.HasAttributes && reader.MoveToFirstAttribute()) { do { streamInfo.AddAttribute(reader.Name, reader.Value); }while (reader.MoveToNextAttribute()); reader.MoveToFirstAttribute(); } }
/// <summary> /// Creates a clone instance of this StreamInfo object. /// </summary> /// <returns>A copy of the StreamInfo object.</returns> public StreamInfo Clone() { StreamInfo clone = new StreamInfo(this.StreamType); clone.ParentClip = this.ParentClip; foreach (QualityLevel qualityLevel in this.QualityLevels) { clone.QualityLevels.Add(qualityLevel.Clone()); } foreach (Chunk chunk in this.Chunks) { clone.Chunks.Add(chunk); } foreach (KeyValuePair <string, string> attributeValuePair in this.Attributes) { clone.AddAttribute(attributeValuePair.Key, attributeValuePair.Value); } return(clone); }
/// <summary> /// Adds attributes to the stream info. /// </summary> /// <param name="reader">The xml reader.</param> /// <param name="streamInfo">The stream info.</param> private static void AddAttributes(XmlReader reader, StreamInfo streamInfo) { if (reader.HasAttributes && reader.MoveToFirstAttribute()) { do { streamInfo.AddAttribute(reader.Name, reader.Value); } while (reader.MoveToNextAttribute()); reader.MoveToFirstAttribute(); } }
/// <summary> /// Creates a clone instance of this StreamInfo object. /// </summary> /// <returns>A copy of the StreamInfo object.</returns> public StreamInfo Clone() { StreamInfo clone = new StreamInfo(this.StreamType); clone.ParentClip = this.ParentClip; foreach (QualityLevel qualityLevel in this.QualityLevels) { clone.QualityLevels.Add(qualityLevel.Clone()); } foreach (Chunk chunk in this.Chunks) { clone.Chunks.Add(chunk); } foreach (KeyValuePair<string, string> attributeValuePair in this.Attributes) { clone.AddAttribute(attributeValuePair.Key, attributeValuePair.Value); } return clone; }