private void WriteStandaloneTag(OoxmlComplexType tag, StreamSheetSection section, string tagname) { if (tag != null) { if (this._currentSection != section) { this.TryMoveToSection(section, 1); } tag.Write(this._output, tagname, 1, this.Namespaces); } }
private void WriteTagInCollection <TCol>(OoxmlComplexType tag, StreamSheetSection section, string tagname, string coltagname) where TCol : OoxmlComplexType, new() { if (tag != null) { if (this._currentSection != section) { this.TryMoveToSection(section, 1); this._pendingCloseTag = coltagname; TCol val = new TCol(); val.WriteOpenTag(this._output, coltagname, 1, this.Namespaces, false); } tag.Write(this._output, tagname, 2, this.Namespaces); } }