public static string FormatJson(JToken value) { var builder = new ColoredStringBuilder(); var formatter = new WhatIfJsonFormatter(builder); formatter.FormatJson(value, ""); return(builder.ToString()); }
public static string Format(PSWhatIfOperationResult result) { var builder = new ColoredStringBuilder(); var formatter = new WhatIfOperationResultFormatter(builder); formatter.FormatPreviewNotice(); formatter.FormatLegend(result.Changes); formatter.FormatResourceChanges(result.Changes); formatter.FormatStats(result.Changes); return(builder.ToString()); }
private WhatIfOperationResultFormatter(ColoredStringBuilder builder) : base(builder) { }
public WhatIfJsonFormatter(ColoredStringBuilder builder) { this.Builder = builder; }
public AnsiColorScope(ColoredStringBuilder builder, Color color) { this.builder = builder; this.builder.PushColor(color); }