Esempio n. 1
0
 public Format Put(string text)
 {
     if (text.StartsWith(Final.at))
     {
         var indent = Final.tabs.Substring(0, writer.Level());
         text = text.Replace(Final.line, indent);
         text = text.Replace(Final.at, indent);
     }
     writer.Write(text);
     return(Put());
 }
Esempio n. 2
0
    public Format(string format, FormatWriter writer)
    {
        if (format.StartsWith(Final.at))
        {
            var indent = Final.tabs.Substring(0, writer.Level());
            format = format.Replace(Final.line, indent);
            format = format.Replace(Final.at, indent);
        }
        var first = format.IndexOf(Final.arg);
        var sub   = format.Substring(0, first);

        writer.Write(sub);
        index       = first + Final.arg.Length;
        this.format = format;
        this.writer = writer;
    }