250 lines
12 KiB
C#
250 lines
12 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Threading
|
|
{
|
|
/// <summary>Propagates notification that operations should be canceled.</summary>
|
|
// Token: 0x02000301 RID: 769
|
|
[Token(Token = "0x2000301")]
|
|
[DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}")]
|
|
[ComVisible(false)]
|
|
public struct CancellationToken
|
|
{
|
|
/// <summary>Returns an empty <see cref="T:System.Threading.CancellationToken" /> value.</summary>
|
|
/// <returns>An empty cancellation token.</returns>
|
|
// Token: 0x170003D3 RID: 979
|
|
// (get) Token: 0x06001C7B RID: 7291 RVA: 0x00012888 File Offset: 0x00010A88
|
|
[Token(Token = "0x170003D3")]
|
|
public static CancellationToken None
|
|
{
|
|
[Token(Token = "0x6001C7B")]
|
|
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630")]
|
|
get
|
|
{
|
|
return default(CancellationToken);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets whether cancellation has been requested for this token.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if cancellation has been requested for this token; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x170003D4 RID: 980
|
|
// (get) Token: 0x06001C7C RID: 7292 RVA: 0x000128A0 File Offset: 0x00010AA0
|
|
[Token(Token = "0x170003D4")]
|
|
public bool IsCancellationRequested
|
|
{
|
|
[Token(Token = "0x6001C7C")]
|
|
[Address(RVA = "0x291F5B0", Offset = "0x291E3B0", VA = "0x18291F5B0")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets whether this token is capable of being in the canceled state.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if this token is capable of being in the canceled state; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x170003D5 RID: 981
|
|
// (get) Token: 0x06001C7D RID: 7293 RVA: 0x000128B8 File Offset: 0x00010AB8
|
|
[Token(Token = "0x170003D5")]
|
|
public bool CanBeCanceled
|
|
{
|
|
[Token(Token = "0x6001C7D")]
|
|
[Address(RVA = "0x291F580", Offset = "0x291E380", VA = "0x18291F580")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001C7E RID: 7294 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C7E")]
|
|
[Address(RVA = "0x461A30", Offset = "0x460830", VA = "0x180461A30")]
|
|
internal CancellationToken(CancellationTokenSource source)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes the <see cref="T:System.Threading.CancellationToken" />.</summary>
|
|
/// <param name="canceled">The canceled state for the token.</param>
|
|
// Token: 0x06001C7F RID: 7295 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C7F")]
|
|
[Address(RVA = "0x291F510", Offset = "0x291E310", VA = "0x18291F510")]
|
|
public CancellationToken(bool canceled)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001C80 RID: 7296 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C80")]
|
|
[Address(RVA = "0x291EBE0", Offset = "0x291D9E0", VA = "0x18291EBE0")]
|
|
private static void ActionToActionObjShunt(object obj)
|
|
{
|
|
}
|
|
|
|
/// <summary>Registers a delegate that will be called when this <see cref="T:System.Threading.CancellationToken" /> is canceled.</summary>
|
|
/// <param name="callback">The delegate to be executed when the <see cref="T:System.Threading.CancellationToken" /> is canceled.</param>
|
|
/// <returns>The <see cref="T:System.Threading.CancellationTokenRegistration" /> instance that can be used to unregister the callback.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="callback" /> is null.</exception>
|
|
// Token: 0x06001C81 RID: 7297 RVA: 0x000128D0 File Offset: 0x00010AD0
|
|
[Token(Token = "0x6001C81")]
|
|
[Address(RVA = "0x291EF40", Offset = "0x291DD40", VA = "0x18291EF40")]
|
|
public CancellationTokenRegistration Register(Action callback)
|
|
{
|
|
return default(CancellationTokenRegistration);
|
|
}
|
|
|
|
/// <summary>Registers a delegate that will be called when this <see cref="T:System.Threading.CancellationToken" /> is canceled.</summary>
|
|
/// <param name="callback">The delegate to be executed when the <see cref="T:System.Threading.CancellationToken" /> is canceled.</param>
|
|
/// <param name="state">The state to pass to the <paramref name="callback" /> when the delegate is invoked. This may be null.</param>
|
|
/// <returns>The <see cref="T:System.Threading.CancellationTokenRegistration" /> instance that can be used to unregister the callback.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="callback" /> is null.</exception>
|
|
// Token: 0x06001C82 RID: 7298 RVA: 0x000128E8 File Offset: 0x00010AE8
|
|
[Token(Token = "0x6001C82")]
|
|
[Address(RVA = "0x291F080", Offset = "0x291DE80", VA = "0x18291F080")]
|
|
public CancellationTokenRegistration Register(Action<object> callback, object state)
|
|
{
|
|
return default(CancellationTokenRegistration);
|
|
}
|
|
|
|
/// <summary>Registers a delegate that will be called when this <see cref="T:System.Threading.CancellationToken" /> is canceled.</summary>
|
|
/// <param name="callback">The delegate to be executed when the <see cref="T:System.Threading.CancellationToken" /> is canceled.</param>
|
|
/// <param name="state">The state to pass to the <paramref name="callback" /> when the delegate is invoked. This may be null.</param>
|
|
/// <param name="useSynchronizationContext">A Boolean value that indicates whether to capture the current <see cref="T:System.Threading.SynchronizationContext" /> and use it when invoking the <paramref name="callback" />.</param>
|
|
/// <returns>The <see cref="T:System.Threading.CancellationTokenRegistration" /> instance that can be used to unregister the callback.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="callback" /> is null.</exception>
|
|
// Token: 0x06001C83 RID: 7299 RVA: 0x00012900 File Offset: 0x00010B00
|
|
[Token(Token = "0x6001C83")]
|
|
[Address(RVA = "0x291F030", Offset = "0x291DE30", VA = "0x18291F030")]
|
|
public CancellationTokenRegistration Register(Action<object> callback, object state, bool useSynchronizationContext)
|
|
{
|
|
return default(CancellationTokenRegistration);
|
|
}
|
|
|
|
// Token: 0x06001C84 RID: 7300 RVA: 0x00012918 File Offset: 0x00010B18
|
|
[Token(Token = "0x6001C84")]
|
|
[Address(RVA = "0x291EF00", Offset = "0x291DD00", VA = "0x18291EF00")]
|
|
internal CancellationTokenRegistration InternalRegisterWithoutEC(Action<object> callback, object state)
|
|
{
|
|
return default(CancellationTokenRegistration);
|
|
}
|
|
|
|
// Token: 0x06001C85 RID: 7301 RVA: 0x00012930 File Offset: 0x00010B30
|
|
[Token(Token = "0x6001C85")]
|
|
[Address(RVA = "0x291F150", Offset = "0x291DF50", VA = "0x18291F150")]
|
|
private CancellationTokenRegistration Register(Action<object> callback, object state, bool useSynchronizationContext, bool useExecutionContext)
|
|
{
|
|
return default(CancellationTokenRegistration);
|
|
}
|
|
|
|
/// <summary>Determines whether the current <see cref="T:System.Threading.CancellationToken" /> instance is equal to the specified token.</summary>
|
|
/// <param name="other">The other <see cref="T:System.Threading.CancellationToken" /> to compare with this instance.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the instances are equal; otherwise, <see langword="false" />. See the Remarks section for more information.</returns>
|
|
// Token: 0x06001C86 RID: 7302 RVA: 0x00012948 File Offset: 0x00010B48
|
|
[Token(Token = "0x6001C86")]
|
|
[Address(RVA = "0x291ECC0", Offset = "0x291DAC0", VA = "0x18291ECC0")]
|
|
public bool Equals(CancellationToken other)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Determines whether the current <see cref="T:System.Threading.CancellationToken" /> instance is equal to the specified <see cref="T:System.Object" />.</summary>
|
|
/// <param name="other">The other object to compare with this instance.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if <paramref name="other" /> is a <see cref="T:System.Threading.CancellationToken" /> and if the two instances are equal; otherwise, <see langword="false" />. See the Remarks section for more information.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">An associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
// Token: 0x06001C87 RID: 7303 RVA: 0x00012960 File Offset: 0x00010B60
|
|
[Token(Token = "0x6001C87")]
|
|
[Address(RVA = "0x291EC30", Offset = "0x291DA30", VA = "0x18291EC30", Slot = "0")]
|
|
public override bool Equals(object other)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Serves as a hash function for a <see cref="T:System.Threading.CancellationToken" />.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.Threading.CancellationToken" /> instance.</returns>
|
|
// Token: 0x06001C88 RID: 7304 RVA: 0x00012978 File Offset: 0x00010B78
|
|
[Token(Token = "0x6001C88")]
|
|
[Address(RVA = "0x291EE30", Offset = "0x291DC30", VA = "0x18291EE30", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Determines whether two <see cref="T:System.Threading.CancellationToken" /> instances are equal.</summary>
|
|
/// <param name="left">The first instance.</param>
|
|
/// <param name="right">The second instance.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the instances are equal; otherwise, <see langword="false" /> See the Remarks section for more information.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">An associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
// Token: 0x06001C89 RID: 7305 RVA: 0x00012990 File Offset: 0x00010B90
|
|
[Token(Token = "0x6001C89")]
|
|
[Address(RVA = "0x291F5E0", Offset = "0x291E3E0", VA = "0x18291F5E0")]
|
|
public static bool operator ==(CancellationToken left, CancellationToken right)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Determines whether two <see cref="T:System.Threading.CancellationToken" /> instances are not equal.</summary>
|
|
/// <param name="left">The first instance.</param>
|
|
/// <param name="right">The second instance.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the instances are not equal; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">An associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
// Token: 0x06001C8A RID: 7306 RVA: 0x000129A8 File Offset: 0x00010BA8
|
|
[Token(Token = "0x6001C8A")]
|
|
[Address(RVA = "0x291F600", Offset = "0x291E400", VA = "0x18291F600")]
|
|
public static bool operator !=(CancellationToken left, CancellationToken right)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</summary>
|
|
/// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
|
|
// Token: 0x06001C8B RID: 7307 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C8B")]
|
|
[Address(RVA = "0x291F320", Offset = "0x291E120", VA = "0x18291F320")]
|
|
public void ThrowIfCancellationRequested()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001C8C RID: 7308 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C8C")]
|
|
[Address(RVA = "0x291F360", Offset = "0x291E160", VA = "0x18291F360")]
|
|
internal void ThrowIfSourceDisposed()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001C8D RID: 7309 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C8D")]
|
|
[Address(RVA = "0x291F430", Offset = "0x291E230", VA = "0x18291F430")]
|
|
private void ThrowOperationCanceledException()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001C8E RID: 7310 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001C8E")]
|
|
[Address(RVA = "0x291F3C0", Offset = "0x291E1C0", VA = "0x18291F3C0")]
|
|
private static void ThrowObjectDisposedException()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001052 RID: 4178
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001052")]
|
|
private CancellationTokenSource m_source;
|
|
|
|
// Token: 0x04001053 RID: 4179
|
|
[Token(Token = "0x4001053")]
|
|
private static readonly Action<object> s_ActionToActionObjShunt;
|
|
}
|
|
}
|