-
-
Notifications
You must be signed in to change notification settings - Fork 203
/
ISentryScopeManager.cs
45 lines (40 loc) · 1.5 KB
/
ISentryScopeManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
namespace Sentry;
/// <summary>
/// Scope management.
/// </summary>
/// <remarks>
/// An implementation shall create new scopes and allow consumers
/// modify the current scope.
/// </remarks>
public interface ISentryScopeManager
{
/// <summary>
/// Configures the current scope.
/// </summary>
/// <param name="configureScope">The configure scope.</param>
void ConfigureScope(Action<Scope> configureScope);
/// <summary>
/// Asynchronously configure the current scope.
/// </summary>
/// <param name="configureScope">The configure scope.</param>
/// <returns>A task that completes when the callback is done or a completed task if the SDK is disabled.</returns>
Task ConfigureScopeAsync(Func<Scope, Task> configureScope);
/// <summary>
/// Binds the client to the current scope.
/// </summary>
/// <param name="client">The client.</param>
void BindClient(ISentryClient client);
/// <summary>
/// Pushes a new scope into the stack which is removed upon Dispose.
/// </summary>
/// <returns>A disposable which removes the scope
/// from the environment when invoked.</returns>
IDisposable PushScope();
/// <summary>
/// Pushes a new scope into the stack which is removed upon Dispose.
/// </summary>
/// <param name="state">A state to associate with the scope.</param>
/// <returns>A disposable which removes the scope
/// from the environment when invoked.</returns>
IDisposable PushScope<TState>(TState state);
}