Beispiel #1
0
        public static void AllowCancel(this IBusyState busyState, CancellationTokenSource cancellationTokenSource, string cancelCaption)
        {
            busyState.AssertNotNull(nameof(busyState));
            cancellationTokenSource.AssertNotNull(nameof(cancellationTokenSource));

            busyState.CancellationCallback = () => cancellationTokenSource.Cancel();
            busyState.CancelCaption        = cancelCaption;
            busyState.CanCancel            = true;
        }
Beispiel #2
0
            public BusyScope(IBusyState busyState)
            {
                busyState.AssertNotNull(nameof(busyState));

                BusyState = busyState;
            }