コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloseElementFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context in which to format.
 /// </param>
 public CloseElementFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #2
0
ファイル: XamlFormatter.cs プロジェクト: hackf5/xamlr
 /// <summary>
 /// Initializes a new instance of the <see cref="XamlFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public XamlFormatter(FormattingContext context)
 {
     this.context = context ?? throw new ArgumentNullException(nameof(context));
 }
コード例 #3
0
ファイル: CommentFormatter.cs プロジェクト: hackf5/xamlr
 /// <summary>
 /// Initializes a new instance of the <see cref="CommentFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public CommentFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SignificantWhiteSpaceFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public SignificantWhiteSpaceFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XmlDeclarationFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public XmlDeclarationFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProcessingInstructionFormatter"/> class. 
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public ProcessingInstructionFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #7
0
ファイル: FormattingExtensions.cs プロジェクト: hackf5/xamlr
 /// <summary>
 /// TAppends a line selectively to the builder depending on the current state of the formatting context.
 /// </summary>
 /// <param name="builder">
 /// The builder.
 /// </param>
 /// <param name="context">
 /// The context.
 /// </param>
 /// <returns>
 /// The original <see cref="StringBuilder"/>.
 /// </returns>
 public static StringBuilder AppendLine(this StringBuilder builder, FormattingContext context) => context.Element.PreserveSpace ? builder : builder.AppendLine();
コード例 #8
0
ファイル: FormattingExtensions.cs プロジェクト: hackf5/xamlr
 /// <summary>
 /// Indents the builder to the current formatting depth.
 /// </summary>
 /// <param name="builder">
 /// The builder.
 /// </param>
 /// <param name="context">
 /// The context.
 /// </param>
 /// <param name="respectWhiteSpace">
 /// A value indicating whether to respect white space.
 /// </param>
 /// <returns>
 /// The original <see cref="StringBuilder"/>.
 /// </returns>
 public static StringBuilder Indent(
     this StringBuilder builder, FormattingContext context, bool respectWhiteSpace = true) =>
 builder.Append(context.GetIndent(respectWhiteSpace));
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MarkupExtensionFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public MarkupExtensionFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #10
0
ファイル: TextFormatter.cs プロジェクト: hackf5/xamlr
 /// <summary>
 /// Initializes a new instance of the <see cref="TextFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public TextFormatter(FormattingContext context)
 {
     this.context = context;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AttributeFormatter"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public AttributeFormatter(FormattingContext context)
 {
     this.context = context;
 }