public void ThrowIfCanceled() { if (m_cancelled) { throw new OperationCanceledException("Operation was cancelled"); } }