Class ChannelBaseExtensions (4.4.0)

public static class ChannelBaseExtensions

Extension methods for ChannelBase.

Inheritance

object > ChannelBaseExtensions

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Methods

Shutdown(ChannelBase, ILogger)

public static void Shutdown(this ChannelBase channel, ILogger logger = null)

Shuts down a channel semi-synchronously. This method initially calls Dispose() if the channel implements IDisposable (e.g. in the case of GrpcChannel) and then calls ShutdownAsync(). This method does not wait for the task to complete, but observes any exceptions (whether the task is faulted or canceled), optionally logging them to logger.

Parameters
Name Description
channel ChannelBase

The channel to shut down.

logger ILogger

An optional logger to record any errors during asynchronous shutdown.