Beispiel #1
0
        public static TranscriptionChapter DeserializeV2(XElement c, bool isStrict)
        {
            TranscriptionChapter chap = new TranscriptionChapter();

            chap.Name     = c.Attribute("name").Value;
            chap.Elements = c.Attributes().ToDictionary(a => a.Name.ToString(), a => a.Value);
            chap.Elements.Remove("name");
            foreach (var s in c.Elements(isStrict ? "section" : "se").Select(s => (TranscriptionElement)TranscriptionSection.DeserializeV2(s, isStrict)))
            {
                chap.Add(s);
            }

            return(chap);
        }
Beispiel #2
0
 public TranscriptionChapter(TranscriptionChapter toCopy)
     : this()
 {
     this.Begin = toCopy.Begin;
     this.End   = toCopy.End;
     this.Name  = toCopy.Name;
     if (toCopy.Sections != null)
     {
         this.Sections = new VirtualTypeList <TranscriptionSection>(this, this._children);
         for (int i = 0; i < toCopy.Sections.Count; i++)
         {
             this.Sections.Add(new TranscriptionSection(toCopy.Sections[i]));
         }
     }
 }