Ejemplo n.º 1
0
        private InformativeCancellationToken GetCancellationTokenForCommand(CancellationToken ct)
        {
            if (IgnoreCancellation())
            {
                return InformativeCancellationToken.ForIgnored();
            }

            if (!IsEnabled())
            {
                return InformativeCancellationToken.ForDisabled();
            }

            return InformativeCancellationToken.ForOverridingToken(ct);
        }