# FileLogger.BeginScope(TState)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.filelogger/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.filelogger/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Logging/FileLogger.cs#L161)

```csharp
public IDisposable BeginScope<TState>(TState state)
```

Begins a logical operation scope.

### Parameters

- `state` (`TState`): The identifier for the scope.

### Returns

An `System.IDisposable` that ends the logical operation scope on dispose.
