public ProgressDialogWindowViewModel( ProgressDialogOptions options, CancellationToken cancellationToken, CancelCommand cancelCommand) { if (options == null) throw new ArgumentNullException("options"); WindowTitle = options.WindowTitle; Label = options.Label; CancelCommand = cancelCommand; // can be null (not cancellable) cancellationToken.Register(OnCancelled); Progress = new Progress<string>(OnProgress); }
public ProgressDialogWindowViewModel( ProgressDialogOptions options, CancellationToken cancellationToken, CancelCommand cancelCommand) { if (options == null) { throw new ArgumentNullException("options"); } WindowTitle = options.WindowTitle; Label = options.Label; CancelCommand = cancelCommand; // can be null (not cancellable) cancellationToken.Register(OnCancelled); Progress = new Progress <string>(OnProgress); }