<PackageReference Include="Grpc.Core.Api" Version="2.80.0" />

Grpc.Core.Interceptors.ChannelExtensions

public static class ChannelExtensions
Provides extension methods to make it easy to register interceptors on Channel objects.
public static CallInvoker Intercept(this ChannelBase channel, Interceptor interceptor)

Returns a CallInvoker instance that intercepts the channel with the given interceptor.

public static CallInvoker Intercept(this ChannelBase channel, Interceptor[] interceptors)

Returns a CallInvoker instance that intercepts the channel with the given interceptors.

public static CallInvoker Intercept(this ChannelBase channel, Func<Metadata, Metadata> interceptor)

Returns a CallInvoker instance that intercepts the invoker with the given interceptor.