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; }
internal OutputContext(ExtenderRegistry extensions, char indentChar, int indentCount, bool compress) { this.Extensions = extensions ?? new ExtenderRegistry(); this.indentChar = indentChar; this.indentCount = indentCount; this.compress = compress; }
public IDisposable EnterExtenderScope(ExtenderRegistry extenders) { return(new ExtenderScope(this, extenders)); }