C# Класс Google.Api.Gax.Grpc.CallSettings

Settings to determine how an RPC operates. This type is immutable.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CallSettings ( CancellationToken cancellationToken, Grpc.Core.CallCredentials credentials, CallTiming timing, Action headerMutation, Grpc.Core.WriteOptions writeOptions, Grpc.Core.ContextPropagationToken propagationToken ) : Grpc.Core

Constructs an instance with the specified settings.

FromCallCredentials ( Grpc.Core.CallCredentials credentials ) : CallSettings

Creates a CallSettings for the specified call credentials, or returns null if credentials is null.

FromCallTiming ( CallTiming timing ) : CallSettings

Creates a CallSettings for the specified call timing, or returns null if timing is null.

FromCancellationToken ( CancellationToken cancellationToken ) : CallSettings

Creates a CallSettings for the specified cancellation token.

FromHeader ( string name, string value ) : CallSettings

Creates a CallSettings for the specified header name and value.

FromHeaderMutation ( Action headerMutation ) : CallSettings

Creates a CallSettings for the specified header mutation, or returns null if headerMutation is null.

Приватные методы

Метод Описание
Merge ( CallSettings original, CallSettings overlaid ) : CallSettings

Merges the settings in overlaid with those in original, with overlaid taking priority. If both arguments are null, the result is null. If one argument is null, the other argument is returned. Otherwise, a new object is created with a property-wise overlay. Any header mutations are combined, however: the mutation from the original is performed, then the mutation in the overlay.

Описание методов

CallSettings() публичный Метод

Constructs an instance with the specified settings.
public CallSettings ( CancellationToken cancellationToken, Grpc.Core.CallCredentials credentials, CallTiming timing, Action headerMutation, Grpc.Core.WriteOptions writeOptions, Grpc.Core.ContextPropagationToken propagationToken ) : Grpc.Core
cancellationToken System.Threading.CancellationToken Cancellation token that can be used for cancelling the call.
credentials Grpc.Core.CallCredentials Credentials to use for the call.
timing CallTiming to use, or null for default retry/expiration behavior.
headerMutation Action Action to modify the headers to send at the beginning of the call.
writeOptions Grpc.Core.WriteOptions that will be used for the call.
propagationToken Grpc.Core.ContextPropagationToken for propagating settings from a parent call.
Результат Grpc.Core

FromCallCredentials() публичный статический Метод

Creates a CallSettings for the specified call credentials, or returns null if credentials is null.
public static FromCallCredentials ( Grpc.Core.CallCredentials credentials ) : CallSettings
credentials Grpc.Core.CallCredentials The call credentials for the new settings.
Результат CallSettings

FromCallTiming() публичный статический Метод

Creates a CallSettings for the specified call timing, or returns null if timing is null.
public static FromCallTiming ( CallTiming timing ) : CallSettings
timing CallTiming The call timing for the new settings.
Результат CallSettings

FromCancellationToken() публичный статический Метод

Creates a CallSettings for the specified cancellation token.
public static FromCancellationToken ( CancellationToken cancellationToken ) : CallSettings
cancellationToken System.Threading.CancellationToken The cancellation token for the new settings.
Результат CallSettings

FromHeader() публичный статический Метод

Creates a CallSettings for the specified header name and value.
public static FromHeader ( string name, string value ) : CallSettings
name string The name of the header to add. Must not be null.
value string The value of the header to add. Must not be null.
Результат CallSettings

FromHeaderMutation() публичный статический Метод

Creates a CallSettings for the specified header mutation, or returns null if headerMutation is null.
public static FromHeaderMutation ( Action headerMutation ) : CallSettings
headerMutation Action Action to modify the headers to send at the beginning of the call.
Результат CallSettings