internal ServerCallContext(CallSafeHandle callHandle, string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, Func <Metadata, Task> writeHeadersFunc, IHasWriteOptions writeOptionsHolder) { this.callHandle = callHandle; this.method = method; this.host = host; this.deadline = deadline; this.requestHeaders = requestHeaders; this.cancellationToken = cancellationToken; this.writeHeadersFunc = writeHeadersFunc; this.writeOptionsHolder = writeOptionsHolder; }
internal ServerCallContext(CallSafeHandle callHandle, string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, Func<Metadata, Task> writeHeadersFunc, IHasWriteOptions writeOptionsHolder) { this.callHandle = callHandle; this.method = method; this.host = host; this.deadline = deadline; this.requestHeaders = requestHeaders; this.cancellationToken = cancellationToken; this.writeHeadersFunc = writeHeadersFunc; this.writeOptionsHolder = writeOptionsHolder; }
// Additional constructor params should be used for testing only internal ServerCallContext(CallSafeHandle callHandle, string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, Func <Metadata, Task> writeHeadersFunc, IHasWriteOptions writeOptionsHolder, Func <string> testingOnlyPeerGetter, Func <AuthContext> testingOnlyAuthContextGetter, Func <ContextPropagationToken> testingOnlyContextPropagationTokenFactory) { this.callHandle = callHandle; this.method = method; this.host = host; this.deadline = deadline; this.requestHeaders = requestHeaders; this.cancellationToken = cancellationToken; this.writeHeadersFunc = writeHeadersFunc; this.writeOptionsHolder = writeOptionsHolder; this.authContext = new Lazy <AuthContext>(GetAuthContextEager); this.testingOnlyPeerGetter = testingOnlyPeerGetter; this.testingOnlyAuthContextGetter = testingOnlyAuthContextGetter; this.testingOnlyContextPropagationTokenFactory = testingOnlyContextPropagationTokenFactory; }
internal ServerCallContext(CallSafeHandle callHandle, string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, Func <Metadata, Task> writeHeadersFunc, IHasWriteOptions writeOptionsHolder) : this(callHandle, method, host, deadline, requestHeaders, cancellationToken, writeHeadersFunc, writeOptionsHolder, null, null, null) { }