Пример #1
0
 internal static FormatterOptionsXml FromSettings(Settings settings)
 {
     return(new FormatterOptionsXml
     {
         AlignParamTags = settings.Formatting_CommentXmlAlignParamTags,
         Default = XmlTagOptions.FromSettings(settings),
         Tags = new Dictionary <string, FormatterOptionsXmlTag>
         {
             // Force the <summary> tag to NOT be indented regardless of the indent setting.
             ["summary"] = new FormatterOptionsXmlTag {
                 Split = settings.Formatting_CommentXmlSplitSummaryTagToMultipleLines ? XmlTagNewLine.Always : XmlTagNewLine.Default, Indent = 0
             },
             ["copyright"] = new FormatterOptionsXmlTag {
                 Split = XmlTagNewLine.Always, Indent = CodeCommentHelper.CopyrightExtraIndent
             },
             ["code"] = new FormatterOptionsXmlTag {
                 Split = XmlTagNewLine.BeforeAndAfter, Literal = true
             },
             ["p"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["para"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["list"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["listheader"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["item"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["term"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
             ["description"] = FormatterOptionsXmlTagOverrideSplitBeforeAfter,
         }
     });
 }
Пример #2
0
 public FormatterOptionsXml()
 {
     Tags    = new Dictionary <string, FormatterOptionsXmlTag>(StringComparer.OrdinalIgnoreCase);
     Default = new XmlTagOptions();
 }