# DurableTaskContext.DurableTaskContext(TaskId)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskcontext/) | [Constructors](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskcontext/constructors/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTaskContext.cs#L42-L76)

```csharp
protected DurableTaskContext(TaskId taskId)
```

Initializes an attempt of the durable task `taskId`.

### Parameters

- `taskId` (`TaskId`): The stable identifier of the task which this attempt runs.
