Exemple #1
0
 public static Document BracedListKeepIndentation(
     BracedListConfig config,
     Document[] elements)
 {
     return(Document.Concat(
                config.StartBrace,
                Document.KeepIndentation(
                    Document.FormatSeparator(
                        config.NewLineReplacement,
                        Utils.WithSeparator(config.ListSeparator, elements)
                        )),
                config.EndBrace));
 }
Exemple #2
0
 public static Document BracedListIndentAmount(
     BracedListConfig config,
     int amount,
     Document[] elements)
 {
     return(Document.Format(
                config.StartBrace,
                Document.Indent(
                    amount,
                    Document.FormatSeparator(
                        config.NewLineReplacement,
                        Utils.WithSeparator(config.ListSeparator, elements)
                        )),
                config.EndBrace));
 }
Exemple #3
0
 private record ListConfig(BracedListConfig KeepIndentation, BracedListConfig IndentAmount);