示例#1
0
 public ExtenderScope(IExtensionContext ctx, ExtenderRegistry newScope)
 {
     this.ctx = ctx;
     this.originalExtensions = this.ctx.Extensions;
     // If we don't actually have a new scope, then this is a no-op.
     this.ctx.Extensions = newScope ?? this.originalExtensions;
 }
示例#2
0
 internal OutputContext(ExtenderRegistry extensions, char indentChar, int indentCount, bool compress)
 {
     this.Extensions  = extensions ?? new ExtenderRegistry();
     this.indentChar  = indentChar;
     this.indentCount = indentCount;
     this.compress    = compress;
 }
示例#3
0
 public IDisposable EnterExtenderScope(ExtenderRegistry extenders)
 {
     return(new ExtenderScope(this, extenders));
 }