C# Class Catel.Services.IPleaseWaitServiceExtensions

IPleaseWaitService extensions.
Show file Open project: Catel/Catel

Public Methods

Method Description
HideTemporarily ( this pleaseWaitService ) : IDisposable

Hides the please wait service temporarily by storing the show counter and restoring it afterwards.

PushInScope ( this pleaseWaitService ) : IDisposable

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.

Method Details

HideTemporarily() public static method

Hides the please wait service temporarily by storing the show counter and restoring it afterwards.
public static HideTemporarily ( this pleaseWaitService ) : IDisposable
pleaseWaitService this
return IDisposable

PushInScope() public static method

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.
return IDisposable