Catel.Services.IPleaseWaitServiceExtensions.PushInScope C# (CSharp) Метод

PushInScope() публичный статический Метод

Calls IPleaseWaitService.Push and returns a disposable token. As soon as the token is disposed, it will call IPleaseWaitService.Pop. This is a great way to safely show a busy indicator and ensure that the indicator hides, even when an exception occurs.
public static PushInScope ( this pleaseWaitService ) : IDisposable
pleaseWaitService this The please wait service.
Результат IDisposable
        public static IDisposable PushInScope(this IPleaseWaitService pleaseWaitService)
        {
            Argument.IsNotNull("pleaseWaitService", pleaseWaitService);

            return new DisposableToken<IPleaseWaitService>(pleaseWaitService, token => token.Instance.Push(), token => token.Instance.Pop());
        }
    }
IPleaseWaitServiceExtensions