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