# OrleansService

- Module: [Aspire.Hosting.Orleans](/reference/api/typescript/aspire.hosting.orleans.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface OrleansService {
  asClient(): OrleansServiceClient;
  withBroadcastChannel(name: string): OrleansService;
  withClusterId(clusterId: string): OrleansService;
  withClustering(provider: IResourceWithConnectionString): OrleansService;
  withDevelopmentClustering(): OrleansService;
  withGrainDirectory(
      name: string,
      provider: IResourceWithConnectionString): OrleansService;
  withGrainStorage(
      name: string,
      provider: IResourceWithConnectionString): OrleansService;
  withMemoryGrainStorage(name: string): OrleansService;
  withMemoryReminders(): OrleansService;
  withMemoryStreaming(name: string): OrleansService;
  withReminders(provider: IResourceWithConnectionString): OrleansService;
  withServiceId(serviceId: string): OrleansService;
  withStreaming(
      name: string,
      provider: IResourceWithConnectionString): OrleansService;
}
```

## Methods

- [asClient](/reference/api/typescript/aspire.hosting.orleans/orleansservice/asclient.md) -- `method` -- Creates an Orleans client view for the service
    ```typescript
  asClient(): OrleansServiceClient
  ```
- [withBroadcastChannel](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withbroadcastchannel.md) -- `method` -- Adds an Orleans broadcast channel provider
    ```typescript
  withBroadcastChannel(name: string): OrleansService
  ```
- [withClusterId](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withclusterid.md) -- `method` -- Sets the Orleans cluster ID
    ```typescript
  withClusterId(clusterId: string): OrleansService
  ```
- [withClustering](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withclustering.md) -- `method` -- Configures Orleans clustering using a resource connection
    ```typescript
  withClustering(provider: IResourceWithConnectionString): OrleansService
  ```
- [withDevelopmentClustering](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withdevelopmentclustering.md) -- `method` -- Configures Orleans development clustering
    ```typescript
  withDevelopmentClustering(): OrleansService
  ```
- [withGrainDirectory](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withgraindirectory.md) -- `method` -- Adds an Orleans grain directory provider
    ```typescript
  withGrainDirectory(name: string, provider: IResourceWithConnectionString): OrleansService
  ```
- [withGrainStorage](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withgrainstorage.md) -- `method` -- Adds an Orleans grain storage provider
    ```typescript
  withGrainStorage(name: string, provider: IResourceWithConnectionString): OrleansService
  ```
- [withMemoryGrainStorage](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withmemorygrainstorage.md) -- `method` -- Adds in-memory Orleans grain storage
    ```typescript
  withMemoryGrainStorage(name: string): OrleansService
  ```
- [withMemoryReminders](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withmemoryreminders.md) -- `method` -- Configures in-memory Orleans reminders
    ```typescript
  withMemoryReminders(): OrleansService
  ```
- [withMemoryStreaming](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withmemorystreaming.md) -- `method` -- Adds in-memory Orleans streaming
    ```typescript
  withMemoryStreaming(name: string): OrleansService
  ```
- [withReminders](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withreminders.md) -- `method` -- Configures Orleans reminder storage
    ```typescript
  withReminders(provider: IResourceWithConnectionString): OrleansService
  ```
- [withServiceId](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withserviceid.md) -- `method` -- Sets the Orleans service ID
    ```typescript
  withServiceId(serviceId: string): OrleansService
  ```
- [withStreaming](/reference/api/typescript/aspire.hosting.orleans/orleansservice/withstreaming.md) -- `method` -- Adds an Orleans stream provider
    ```typescript
  withStreaming(name: string, provider: IResourceWithConnectionString): OrleansService
  ```
