private InformativeCancellationToken GetCancellationTokenForCommand(BaseCommand command, long? invocationTimeout = null) { if (IgnoreCancellation()) { return InformativeCancellationToken.ForIgnored(); } var timeout = command.DetermineTimeout(_config, invocationTimeout); return InformativeCancellationToken.ForTimeout(timeout); }
private InformativeCancellationToken GetCancellationTokenForCommand(CancellationToken ct) { if (IgnoreCancellation()) { return InformativeCancellationToken.ForIgnored(); } if (!IsEnabled()) { return InformativeCancellationToken.ForDisabled(); } return InformativeCancellationToken.ForOverridingToken(ct); }