# OrleansService Constructors

- Package: [Aspire.Hosting.Orleans](/reference/api/csharp/aspire.hosting.orleans.md)
- Type: [OrleansService](/reference/api/csharp/aspire.hosting.orleans/orleansservice.md)
- Kind: `Constructors`
- Members: `1`

Describes an Orleans service.

## OrleansService(IDistributedApplicationBuilder, string)

- Name: `Constructor(IDistributedApplicationBuilder, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Orleans/OrleansService.cs#L17-L83)

Initializes a new [OrleansService](/reference/api/csharp/aspire.hosting.orleans/orleansservice.md) instance.

```csharp
public sealed class OrleansService
{
    public OrleansService(
        IDistributedApplicationBuilder builder,
        string name)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IDistributedApplicationBuilder`)
  The distributed application builder.
- `name` (`string`)
  The service name.
