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."],[[["The `ChannelBaseExtensions` class provides extension methods for working with channels, specifically for managing their shutdown process."],["The latest version of the documentation available is 4.10.0, while the provided content specifically references version 4.2.0 of the `Google.Api.Gax` package."],["The `Shutdown` method allows for semi-synchronous channel shutdown, handling the disposal of the channel and any subsequent tasks, logging errors to an optional logger."],["The `ChannelBaseExtensions` class inherits from `Object` and includes several methods inherited from that class, like `ToString()`, `Equals()`, and `GetHashCode()`."]]],[]]