#if MONO
using System;
using System.Diagnostics;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
namespace System.Threading
{
[Serializable]
internal enum StackCrawlMark
{
LookForMe,
LookForMyCaller,
LookForMyCallersCaller,
LookForThread
}
/// Propagates notification that operations should be canceled.
[__DynamicallyInvokable, DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}"), ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)]
public struct CancellationToken
{
private CancellationTokenSource m_source;
private static readonly Action