# AzureTableGrainStorage Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/)

## ClearStateAsync(string, GrainId, IGrainState&lt;T&gt;) {#clearstateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-91341982}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/methods/clearstateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-91341982/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs#L126-L158)

```csharp
public Task ClearStateAsync<T>(string grainType, GrainId grainId, IGrainState<T> grainState)
```

Clear / Delete state data function for this storage provider.

### Parameters

- `grainType` (`string`)
- `grainId` (`GrainId`)
- `grainState` (`IGrainState<T>`)

## DecodeException(Exception, HttpStatusCode, string, bool) {#decodeexception-system-exception-out-system-net-httpstatuscode-out-string-bool-b4d168e9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/methods/decodeexception-system-exception-out-system-net-httpstatuscode-out-string-bool-b4d168e9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs#L484)

```csharp
public bool DecodeException(Exception e, out HttpStatusCode httpStatusCode, out string restStatus, bool getRESTErrors = false)
```

Decodes Storage exceptions.

### Parameters

- `e` (`Exception`)
- `httpStatusCode` (`HttpStatusCode`)
- `restStatus` (`string`)
- `getRESTErrors` (`bool`)

## Participate(ISiloLifecycle) {#participate-orleans-runtime-isilolifecycle-124be9c4}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/methods/participate-orleans-runtime-isilolifecycle-124be9c4/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs#L514-L515)

```csharp
public void Participate(ISiloLifecycle lifecycle)
```

Adds the provided observer as a participant in the lifecycle.

### Parameters

- `lifecycle` (`ISiloLifecycle`): The observer.

## ReadStateAsync(string, GrainId, IGrainState&lt;T&gt;) {#readstateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-dca5dd9d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/methods/readstateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-dca5dd9d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs#L67-L87)

```csharp
public Task ReadStateAsync<T>(string grainType, GrainId grainId, IGrainState<T> grainState)
```

Read state data function for this storage provider.

### Parameters

- `grainType` (`string`)
- `grainId` (`GrainId`)
- `grainState` (`IGrainState<T>`)

## WriteStateAsync(string, GrainId, IGrainState&lt;T&gt;) {#writestateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-0c50e7ec}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.azurestorage/orleans.storage.azuretablegrainstorage/methods/writestateasync-1-string-orleans-runtime-grainid-orleans-igrainstate-t-0c50e7ec/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs#L93-L115)

```csharp
public Task WriteStateAsync<T>(string grainType, GrainId grainId, IGrainState<T> grainState)
```

Write state data function for this storage provider.

### Parameters

- `grainType` (`string`)
- `grainId` (`GrainId`)
- `grainState` (`IGrainState<T>`)
