Ejemplo n.º 1
0
 public RenderPtxContext(Module module)
     : base(module)
 {
     Buf = new StringBuilder();
     Delayed = Buf.Delayed();
     Writer = Delayed.Indented();
 }
Ejemplo n.º 2
0
        public IDisposable OverrideBuf(StringBuilder new_buf)
        {
            var old_buf = Buf;
            var old_delayed = Delayed;
            var old_writer = Writer;

            Buf = new_buf;
            Delayed = Buf.Delayed();
            Writer = Delayed.Indented();

            return new DisposableAction(() =>
            {
                Buf = old_buf;
                Delayed = old_delayed;
                Writer = old_writer;
            });
        }