public LongRunningOperation() { this._cancellationTokenSource = new CancellationTokenSource(); this._switchbackToPreviousBar = () => { Debug.WriteLine("No switch-back delegate set!"); }; this._context = new LongRunningOperationContext(this._cancellationTokenSource.Token, new EncryptionProgress(p => { Debug.WriteLine("No reporting delegate set!."); })); }
public LongRunningOperation(Action <EncryptionProgress> reportAction, Action switchbackToPreviousBar) { this._cancellationTokenSource = new CancellationTokenSource(); this._switchbackToPreviousBar = switchbackToPreviousBar; this._context = new LongRunningOperationContext(this._cancellationTokenSource.Token, new EncryptionProgress(reportAction)); }