IExclusivityMode

Represents an exclusivity mode.

Represents an exclusivity mode.

Methods

public T Run<T>(Func<T> func)

Runs the specified function in exclusive mode.

Parameters:

func (Func<T>)
The func to run in exclusive mode.

Returns:

The result of the function.

public Task<T> RunAsync<T>(Func<Task<T>> func)

Runs the specified function in exclusive mode asynchronously.

Parameters:

func (Func<Task<T>>)
The func to run in exclusive mode.

Returns:

The result of the function.