示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 // 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;
 }
示例#4
0
 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)
 {
 }