# Class ChannelBase (2.66.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.66.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase)
- [2.63.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.ChannelBase)
- [2.48.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.ChannelBase)

    public abstract class ChannelBase

Base class for gRPC channel. Channels are an abstraction of long-lived connections to remote servers.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ChannelBase

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Grpc.Core](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)

## Assembly

Grpc.Core.Api.dll

## Constructors

### ChannelBase(string)

    protected ChannelBase(string target)

Initializes a new instance of [ChannelBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase) class that connects to a specific host.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `target` | `https://learn.microsoft.com/dotnet/api/system.string` Target of the channel. |

## Properties

### Target

    public string Target { get; }

The original target used to create the channel.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

## Methods

### CreateCallInvoker()

    public abstract CallInvoker CreateCallInvoker()

Create a new [CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker) for the channel.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker` | A new [CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker). |

### ShutdownAsync()

    public Task ShutdownAsync()

Shuts down the channel cleanly. It is strongly recommended to shutdown
the channel once you stopped using it.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` |   |

**Remarks** Guidance for implementors:
This method doesn't wait for all calls on this channel to finish (nor does
it have to explicitly cancel all outstanding calls). It is user's responsibility to make sure
all the calls on this channel have finished (successfully or with an error)
before shutting down the channel to ensure channel shutdown won't impact
the outcome of those remote calls.

### ShutdownAsyncCore()

    protected virtual Task ShutdownAsyncCore()

Provides implementation of a non-virtual public member.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` |   |

## Extension Methods

[ChannelExtensions.Intercept(ChannelBase, Interceptor)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Interceptors.ChannelExtensions#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_Grpc_Core_Interceptors_Interceptor_) [ChannelExtensions.Intercept(ChannelBase, params Interceptor\[\])](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Interceptors.ChannelExtensions#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_Grpc_Core_Interceptors_Interceptor___) [ChannelExtensions.Intercept(ChannelBase, Func\<Metadata, Metadata\>)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Interceptors.ChannelExtensions#Grpc_Core_Interceptors_ChannelExtensions_Intercept_Grpc_Core_ChannelBase_System_Func_Grpc_Core_Metadata_Grpc_Core_Metadata__)