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 )
and then calls . 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage details the \u003ccode\u003eChannelBaseExtensions\u003c/code\u003e class within the \u003ccode\u003eGoogle.Api.Gax.Grpc\u003c/code\u003e namespace, part of the Google.Api.Gax.Grpc.dll assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 4.10.0, with versions dating back to 3.2.0, and it has a inheritance from the \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides extension methods, including a \u003ccode\u003eShutdown\u003c/code\u003e method to manage channel termination, supporting both synchronous disposal and asynchronous shutdown, with optional logging of errors.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eShutdown\u003c/code\u003e method, which is available in this class, accepts a channel to shut down and an optional logger to record any errors.\u003c/p\u003e\n"]]],[],null,[]]