Пример #1
0
 /// <summary>
 /// Creates a new tenant scope and returns IDisposable to be disposed at the end of the scope
 /// </summary>
 /// <param name="tenant">A string Tenant id</param>
 /// <returns>Returns IDisposable to be disposed at the end of the scope</returns>
 public static IDisposable BeginScope(string tenant)
 {
     ContextStack = ContextStack.Push(tenant);
     OnBeginScope?.Invoke(new TenantScopeEventArgs(tenant));
     return(new ContextDisposable());
 }
Пример #2
0
 public void BeginScope()
 {
     OnBeginScope?.Invoke(ScopeOperationName);
 }