void CheckAndHandleCancellationToken(string locationMessage)
 {
     // check CancellationTokenSource to see if this task is canceled
     if (GenericHostsCancellationToken.IsCancellationRequested)
     {
         logger.LogDebug(debugLocalizer["{0}: Cancellation requested, checkpoint number {1}", "StdInHandlerService", locationMessage]);
         GenericHostsCancellationToken.ThrowIfCancellationRequested();
     }
 }
 void CheckAndHandleCancellationToken(int checkpointNumber)
 {
     // check CancellationToken to see if this task is canceled
     if (GenericHostsCancellationToken.IsCancellationRequested)
     {
         logger.LogDebug(debugLocalizer["{0}: Cancellation requested, checkpoint number {1}", "StdInHandlerService", checkpointNumber.ToString(CultureInfo.CurrentCulture)]);
         GenericHostsCancellationToken.ThrowIfCancellationRequested();
     }
 }