# InProcessSiloHandle Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.inprocesssilohandle/)

## CreateAsync(string, IConfiguration, Action&lt;IHostBuilder&gt;) {#createasync-string-microsoft-extensions-configuration-iconfiguration-system-acti-e7c90b65}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.inprocesssilohandle/methods/createasync-string-microsoft-extensions-configuration-iconfiguration-system-acti-e7c90b65/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/InProcessSiloHandle.cs#L43-L59)

```csharp
public static Task<InProcessSiloHandle> CreateAsync(string siloName, IConfiguration configuration, Action<IHostBuilder> postConfigureHostBuilder = null)
```

Create a silo handle.

### Parameters

- `siloName` (`string`): Name of the silo.
- `configuration` (`IConfiguration`): The configuration.
- `postConfigureHostBuilder` (`Action<IHostBuilder>`): An optional delegate which is invoked just prior to building the host builder.

### Returns

The silo handle.

## DisposeAsync {#disposeasync-b4e99577}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.inprocesssilohandle/methods/disposeasync-b4e99577/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/InProcessSiloHandle.cs#L123-L146)

```csharp
public override ValueTask DisposeAsync()
```

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

### Returns

A task that represents the asynchronous dispose operation.

## StopSiloAsync(CancellationToken) {#stopsiloasync-system-threading-cancellationtoken-e3518dc5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.inprocesssilohandle/methods/stopsiloasync-system-threading-cancellationtoken-e3518dc5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/InProcessSiloHandle.cs)

```csharp
public override Task StopSiloAsync(CancellationToken ct)
```

Stop the remote silo. This method cannot be use with AppDomain

### Parameters

- `ct` (`CancellationToken`): Specifies the cancellation token to use for the shutdown sequence

## StopSiloAsync(bool) {#stopsiloasync-bool-6feb7fe2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.inprocesssilohandle/methods/stopsiloasync-bool-6feb7fe2/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/InProcessSiloHandle.cs)

```csharp
public override Task StopSiloAsync(bool stopGracefully)
```

Stop the remote silo

### Parameters

- `stopGracefully` (`bool`): Specifies whether the silo should be stopped gracefully or abruptly.
