Beispiel #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="source">Token source</param>
 internal PauseToken(PauseTokenSource source)
 {
     pauseToken = source;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public PauseOrCancelTokenSource()
 {
     pauseTokenSource        = new PauseTokenSource();
     cancellationTokenSource = new CancellationTokenSource();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="pauseTokenSource">Paused token source to use.</param>
 /// <param name="cancellationTokenSource">Cancel token source to use.</param>
 public PauseOrCancelTokenSource(PauseTokenSource pauseTokenSource, CancellationTokenSource cancellationTokenSource)
 {
     this.pauseTokenSource        = pauseTokenSource;
     this.cancellationTokenSource = cancellationTokenSource;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="pauseSource"> Pause token wrapper.</param>
 /// <param name="cancellationSource">Cancel token wrapper.</param>
 public PauseOrCancelToken(PauseTokenSource pauseSource, CancellationTokenSource cancellationSource)
 {
     this.pauseToken        = pauseSource.Token;
     this.cancellationToken = cancellationSource.Token;
 }