/// <summary> /// Initializes a new instance of the <see cref="MutablePropertySet"/> class. /// All nested elements, i.e.<c>Section</c>s and <c>Property</c> instances, will be their /// mutable counterparts in the new <c>MutablePropertySet</c>. /// </summary> /// <param name="ps">The property Set To copy</param> public MutablePropertySet(PropertySet ps) { byteOrder = ps.ByteOrder; format = ps.Format; osVersion = ps.OSVersion; ClassID=ps.ClassID; ClearSections(); if (sections == null) sections = new ArrayList(); for (IEnumerator i = ps.Sections.GetEnumerator(); i.MoveNext(); ) { MutableSection s = new MutableSection((Section)(i.Current)); AddSection(s); } }
/// <summary> /// Creates section 2 if it is not alReady present. /// </summary> private void EnsureSection2() { if (SectionCount < 2) { MutableSection s2 = new MutableSection(); s2.SetFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID2); AddSection(s2); } }