/// <summary> /// Constructs an instance with a pre-initialized ITrackProgress implementation just for measurement /// </summary> /// <param name="mode">The mode</param> public TrackProgressParameters(TrackProgressMode mode) { if (mode == TrackProgressMode.MeasureOnly) { throw new ArgumentException("mode"); } TrackProgressMode = mode; TrackProgress = new BackgroundTask.TrackProgressImpl(); CancellationToken = default(CancellationToken); }
/// <summary> /// Constructs an instance with a pre-initialized ITrackProgress implementation /// </summary> /// <param name="mode">The mode</param> /// <param name="cancellationToken">Cancellation token</param> public TrackProgressParameters(TrackProgressMode mode, CancellationToken cancellationToken) { TrackProgressMode = mode; TrackProgress = new BackgroundTask.TrackProgressImpl(); CancellationToken = cancellationToken; }