internal ContextPropagationToken(CallSafeHandle parentCall, DateTime deadline, CancellationToken cancellationToken, ContextPropagationOptions options)
 {
     this.parentCall = GrpcPreconditions.CheckNotNull(parentCall);
     this.deadline = deadline;
     this.cancellationToken = cancellationToken;
     this.options = options ?? ContextPropagationOptions.Default;
 }
Example #2
0
 internal ContextPropagationToken(CallSafeHandle parentCall, DateTime deadline, GrpcCancellationToken cancellationToken, ContextPropagationOptions options)
 {
     this.parentCall        = GrpcPreconditions.CheckNotNull(parentCall);
     this.deadline          = deadline;
     this.cancellationToken = cancellationToken;
     this.options           = options ?? ContextPropagationOptions.Default;
 }
Example #3
0
 /// <summary>
 /// Creates a propagation token to be used to propagate call context to a child call.
 /// </summary>
 public ContextPropagationToken CreatePropagationToken(ContextPropagationOptions options = null)
 {
     if (testingOnlyContextPropagationTokenFactory != null)
     {
         return(testingOnlyContextPropagationTokenFactory());
     }
     return(new ContextPropagationToken(callHandle, deadline, cancellationToken, options));
 }
Example #4
0
 protected override ContextPropagationToken CreatePropagationTokenCore(ContextPropagationOptions options)
 {
     return(new ContextPropagationTokenImpl(callHandle, deadline, cancellationToken, options));
 }
Example #5
0
 /// <summary>
 /// Creates a propagation token to be used to propagate call context to a child call.
 /// </summary>
 public ContextPropagationToken CreatePropagationToken(ContextPropagationOptions options = null)
 {
     return(new ContextPropagationToken(callHandle, deadline, cancellationToken, options));
 }
Example #6
0
 /// <summary>
 /// Creates a propagation token to be used to propagate call context to a child call.
 /// </summary>
 public ContextPropagationToken CreatePropagationToken(ContextPropagationOptions options = null)
 {
     return new ContextPropagationToken(callHandle, deadline, cancellationToken, options);
 }
Example #7
0
 /// <summary>
 /// Creates a propagation token to be used to propagate call context to a child call.
 /// </summary>
 public ContextPropagationToken CreatePropagationToken(ContextPropagationOptions options = null)
 {
     return(CreatePropagationTokenCore(options));
 }
Example #8
0
 /// <summary>Provides implementation of a non-virtual public member.</summary>
 protected abstract ContextPropagationToken CreatePropagationTokenCore(ContextPropagationOptions options);
 public ContextPropagationToken CreatePropagationToken(ContextPropagationOptions options = null);