# StandaloneSiloHandle Methods

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

## Create(string, IConfiguration) {#create-string-microsoft-extensions-configuration-iconfiguration-6f96dcf5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.standalonesilohandle/methods/create-string-microsoft-extensions-configuration-iconfiguration-6f96dcf5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.cs#L148-L152)

```csharp
public static Task<SiloHandle> Create(string siloName, IConfiguration configuration)
```

Spawns a new process to host a silo, using the executable provided in the configuration's "ExecutablePath" property as the entry point.

### Parameters

- `siloName` (`string`)
- `configuration` (`IConfiguration`)

## CreateDelegate(string) {#createdelegate-string-b9f89bca}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.standalonesilohandle/methods/createdelegate-string-b9f89bca/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.cs#L160-L165)

```csharp
public static Func<string, IConfiguration, Task<SiloHandle>> CreateDelegate(string executablePath)
```

Creates a delegate which spawns a silo in a new process, using the provided executable as the entry point for that silo.

### Parameters

- `executablePath` (`string`): The entry point for spawned silos.

## CreateForAssembly(Assembly) {#createforassembly-system-reflection-assembly-107a0cb2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.standalonesilohandle/methods/createforassembly-system-reflection-assembly-107a0cb2/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.cs#L174-L204)

```csharp
public static Func<string, IConfiguration, Task<SiloHandle>> CreateForAssembly(Assembly assembly)
```

Creates a delegate which spawns a silo in a new process, with the provided assembly (or its executable counterpart, if it is a library) being the entry point for that silo.

### Parameters

- `assembly` (`Assembly`): The entry point for spawned silos. If the provided assembly is a library (dll), then its executable sibling assembly will be invoked instead.

## DisposeAsync {#disposeasync-0a066946}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.standalonesilohandle/methods/disposeasync-0a066946/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.cs#L341-L346)

```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-68a35930}

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.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-32011cc9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.standalonesilohandle/methods/stopsiloasync-bool-32011cc9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/StandaloneSiloHandle.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.
