示例#1
0
 public static IR1Top RConstStringGroup(this IR1Top r1Top, IGConstStringGroup gConstStringGroup)
 {
     r1Top.Indent.Append(r1Top.IndentDelta);
     r1Top.Sb.RenderConstStringGroupStringBuilder(gConstStringGroup, r1Top.Indent, r1Top.Eol, r1Top.Ct);
     r1Top.Indent.ReplaceFirst(r1Top.IndentDelta, "");
     return(r1Top);
 }
示例#2
0
        public static StringBuilder RenderConstStringGroupStringBuilder(this StringBuilder sb, IGConstStringGroup gConstStringGroup, StringBuilder indent, string eol, CancellationToken?ct = default)
        {
            ct?.ThrowIfCancellationRequested();
            sb.Append($"{indent}#region {gConstStringGroup.GName}{eol}");
            foreach (var kvp in gConstStringGroup.GConstStrings)
            {
                sb.RConstStringStringBuilder(kvp.Value, indent, eol, ct);
            }
            sb.Append($"{indent}#endregion {eol}");

            return(sb);
        }