MethodQ.cs
/// <summary>
/// Cancels the specified method call (removes it from the list of scheduled calls). Irreversible!
/// </summary>
/// <param name="id">The scheduled action's identifier.</param>
/// <returns>Whether the cancellation was successful or not (e.g. can't double-cancel or cancel an inexistent call).</returns>
Cancels the specified method call (removes it from the list of scheduled calls). Irreversible!
Cancels the specified method call ( removes it from the list of scheduled calls ) . Irreversible!
public bool Cancel(ulong id)
        {
            if (!timers.TryGetValue(id, out var timer))
                return false;
            if (timer is null || !timer.Enabled)
                return false;
            timer.Stop();
            timer.Dispose();
            return timers.Remove(id);
        }
public bool Cancel ( ulong id ) { if ( ! timers . TryGetValue ( id , out var timer ) ) return false ; if ( timer is null || ! timer . Enabled ) return false ; timer . Stop ( ) ; timer . Dispose ( ) ; return timers . Remove ( id ) ; }
Cancels the specified method call (removes it from the list of scheduled calls).
Cancels the specified method call ( removes it from the list of scheduled calls ) .
Whether the cancellation was successful or not .
Whether the cancellation was successful or not .
id
ulong
The scheduled action's identifier.
The scheduled action ' s identifier .