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

Extension methods for CallSettings. All methods accept a null first parameter as valid unless stated otherwise.
Показать файл Открыть проект Примеры использования класса

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

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

This method 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, where null values do not override non-null values. Any header mutations are combined, however: the mutation from the original is performed, then the mutation in the overlay.

WithCallCredentials ( this settings, Grpc.Core.CallCredentials credentials ) : CallSettings

Returns a new CallSettings with the specified call credentials, merged with the (optional) original settings specified by settings.

WithCallTiming ( this settings, CallTiming timing ) : CallSettings

Returns a new CallSettings with the specified call timing, merged with the (optional) original settings specified by settings.

WithCancellationToken ( this settings, CancellationToken cancellationToken ) : CallSettings

Returns a new CallSettings with the specified cancellation token, merged with the (optional) original settings specified by settings.

WithHeader ( this settings, string name, string value ) : CallSettings

Returns a new CallSettings with the specified header, merged with the (optional) original settings specified by settings.

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

Метод Описание
ToCallOptions ( this baseSettings, CallSettings callSettings, IClock clock ) : Grpc.Core.CallOptions

Transfers settings contained in this into a CallOptions.

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

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

This method 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, where null values do not override non-null values. Any header mutations are combined, however: the mutation from the original is performed, then the mutation in the overlay.
public static MergedWith ( this original, CallSettings overlaid ) : CallSettings
original this Original settings. May be null.
overlaid CallSettings Settings to overlay. May be null.
Результат CallSettings

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

Returns a new CallSettings with the specified call credentials, merged with the (optional) original settings specified by settings.
public static WithCallCredentials ( this settings, Grpc.Core.CallCredentials credentials ) : CallSettings
settings this Original settings. May be null, in which case the returned settings /// will only contain call credentials.
credentials Grpc.Core.CallCredentials Call credentials for the new call settings. /// This may be null, in which case any call credentials in are /// not present in the new call settings. If both this and are null, /// the return value is null.
Результат CallSettings

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

Returns a new CallSettings with the specified call timing, merged with the (optional) original settings specified by settings.
public static WithCallTiming ( this settings, CallTiming timing ) : CallSettings
settings this Original settings. May be null, in which case the returned settings /// will only contain call timing.
timing CallTiming Call timing for the new call settings. /// This may be null, in which case any call timing in are /// not present in the new call settings. If both this and are null, /// the return value is null.
Результат CallSettings

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

Returns a new CallSettings with the specified cancellation token, merged with the (optional) original settings specified by settings.
public static WithCancellationToken ( this settings, CancellationToken cancellationToken ) : CallSettings
settings this Original settings. May be null, in which case the returned settings /// will only contain the cancellation token.
cancellationToken System.Threading.CancellationToken Cancellation token for the new call settings.
Результат CallSettings

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

Returns a new CallSettings with the specified header, merged with the (optional) original settings specified by settings.
public static WithHeader ( this settings, string name, string value ) : CallSettings
settings this Original settings. May be null, in which case the returned settings /// will only contain the header.
name string Header name. Must not be null.
value string Header value. Must not be null.
Результат CallSettings