public IDisposable SetApplicationBusy() { var context = new ApplicationBusyContext() { DisposeCallback = ApplicationBusyContextDisposeCallback }; applicationBusyContext.Add(context); IsApplicationBusy = true; return(context); }
private void ApplicationBusyContextDisposeCallback(ApplicationBusyContext context) { applicationBusyContext.Remove(context); IsApplicationBusy = applicationBusyContext.Any(); }
public IDisposable SetApplicationBusy() { var context = new ApplicationBusyContext() { DisposeCallback = ApplicationBusyContextDisposeCallback }; applicationBusyContext.Add(context); IsApplicationBusy = true; return context; }