# DurableTaskHubResource Constructors

- Package: [Aspire.Hosting.Azure.Functions](/reference/api/csharp/aspire.hosting.azure.functions.md)
- Type: [DurableTaskHubResource](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskhubresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a Durable Task hub resource. A Task Hub groups durable orchestrations and activities. This resource extends the scheduler connection string with the TaskHub name so that clients can connect to the correct hub.

## DurableTaskHubResource(string, DurableTaskSchedulerResource)

- Name: `Constructor(string, DurableTaskSchedulerResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskHubResource.cs#L19)

Represents a Durable Task hub resource. A Task Hub groups durable orchestrations and activities. This resource extends the scheduler connection string with the TaskHub name so that clients can connect to the correct hub.

```csharp
public sealed class DurableTaskHubResource
{
    public DurableTaskHubResource(
        string name,
        DurableTaskSchedulerResource scheduler)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The logical name of the Task Hub (used as the TaskHub value).
- `scheduler` ([DurableTaskSchedulerResource](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskschedulerresource.md))
  The durable task scheduler resource whose connection string is the base for this hub.
