Show / Hide Table of Contents

BeginScope Method

BeginScope<TState>(TState)

Begins a logical operation scope to group log messages together.

C#
[Obsolete("Obsolete, use equivalent ILogger method, or view the changelog for further instruction.")]
public IDisposable? BeginScope<TState>(TState state) where TState : notnull

Parameters

Type Name Description
TState state

The identifier for the scope, usually a string.

Returns

IDisposable

A disposable object that ends the logical operation scope on dispose.

Type Parameters

Name Description
TState

The type of the state being logged as the beginning of a scope. Usually a string.

Implements

ILogger.BeginScope<TState>(TState)
In this article
Back to top Generated by DocFX