gRPC C#
gRPC C#
Namespaces
Grpc.Core
CallOptions Structure
CallOptions Methods
WithCancellationToken Method
WithDeadline Method
WithHeaders Method

CallOptions WithCancellationToken Method

Returns new instance of CallOptions with CancellationToken set to the value provided. Values of all other fields are preserved.

Namespace: Grpc.Core
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
C#
VB
C++
F#
Copy

    public CallOptions WithCancellationToken(
    	CancellationToken cancellationToken
    )

    Public Function WithCancellationToken (
    	cancellationToken As CancellationToken
    ) As CallOptions

    public:
    CallOptions WithCancellationToken(
    	CancellationToken cancellationToken
    )

    member WithCancellationToken :
            cancellationToken : CancellationToken -> CallOptions

#### Parameters

cancellationToken
  Type: System.Threading
  CancellationToken
  The cancellation token.

#### Return Value

Type: CallOptions
See Also

#### Reference

CallOptions Structure
Grpc.Core Namespace