# DurableTask Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletask/)

## Current {#current-3d325bce}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletask/properties/current-3d325bce/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L20-L21)

```csharp
public static DurableTaskContext Current
```

Gets the context of the durable task which the calling code runs in.

### Exceptions

- `System.InvalidOperationException`: The calling code isn't running in a durable task.
