public static IStringBuilder InsertAutoGeneratedHeader(this IStringBuilder sb) { var h = new StringBuilder(); AppendAutoGeneratedHeader(h); sb.Insert(0, h); return(sb); }
public static IStringBuilder InsertAutoGeneratedHeader(this IStringBuilder sb) { var h = new StringBuilder(); h.AppendLine($"//------------------------------------------------------------------------------"); h.AppendLine($"// <auto-generated>"); h.AppendLine($"// This code was generated by a tool."); h.AppendLine($"// Runtime Version: {RuntimeInformation.FrameworkDescription}"); h.AppendLine($"//"); h.AppendLine($"// Changes to this file may cause incorrect behavior and will be lost if"); h.AppendLine($"// the code is regenerated."); h.AppendLine($"// </auto-generated>"); h.AppendLine($"//------------------------------------------------------------------------------"); h.AppendLine(); sb.Insert(0, h); return(sb); }
/// <summary> /// Inserts a character at the cursor without moving the cursor. /// </summary> /// <param name="value">Character to insert.</param> public void Insert(char value) => _buffer.Insert(CursorIndex, value);