80 lines
3.8 KiB
C#
80 lines
3.8 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Runtime.CompilerServices
|
|
{
|
|
/// <summary>Represents an object that waits for the completion of an asynchronous task and provides a parameter for the result.</summary>
|
|
/// <typeparam name="TResult">The result for the task.</typeparam>
|
|
// Token: 0x02000564 RID: 1380
|
|
[Token(Token = "0x2000564")]
|
|
public struct TaskAwaiter<TResult> : ICriticalNotifyCompletion, INotifyCompletion
|
|
{
|
|
// Token: 0x06002C54 RID: 11348 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002C54")]
|
|
[Address(RVA = "0x593200", Offset = "0x592200", VA = "0x180593200")]
|
|
internal TaskAwaiter(Task<TResult> task)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets a value that indicates whether the asynchronous task has completed.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the task has completed; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.NullReferenceException">The <see cref="T:System.Runtime.CompilerServices.TaskAwaiter`1" /> object was not properly initialized.</exception>
|
|
// Token: 0x170006B9 RID: 1721
|
|
// (get) Token: 0x06002C55 RID: 11349 RVA: 0x00018C00 File Offset: 0x00016E00
|
|
[Token(Token = "0x170006B9")]
|
|
public bool IsCompleted
|
|
{
|
|
[Token(Token = "0x6002C55")]
|
|
[Address(RVA = "0x2CEC370", Offset = "0x2CEB370", VA = "0x182CEC370")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Sets the action to perform when the <see cref="T:System.Runtime.CompilerServices.TaskAwaiter`1" /> object stops waiting for the asynchronous task to complete.</summary>
|
|
/// <param name="continuation">The action to perform when the wait operation completes.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="continuation" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.NullReferenceException">The <see cref="T:System.Runtime.CompilerServices.TaskAwaiter`1" /> object was not properly initialized.</exception>
|
|
// Token: 0x06002C56 RID: 11350 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002C56")]
|
|
[Address(RVA = "0x2CFD110", Offset = "0x2CFC110", VA = "0x182CFD110", Slot = "5")]
|
|
public void OnCompleted(Action continuation)
|
|
{
|
|
}
|
|
|
|
/// <summary>Schedules the continuation action for the asynchronous task associated with this awaiter.</summary>
|
|
/// <param name="continuation">The action to invoke when the await operation completes.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="continuation" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The awaiter was not properly initialized.</exception>
|
|
// Token: 0x06002C57 RID: 11351 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002C57")]
|
|
[Address(RVA = "0x2CFD270", Offset = "0x2CFC270", VA = "0x182CFD270", Slot = "4")]
|
|
public void UnsafeOnCompleted(Action continuation)
|
|
{
|
|
}
|
|
|
|
/// <summary>Ends the wait for the completion of the asynchronous task.</summary>
|
|
/// <returns>The result of the completed task.</returns>
|
|
/// <exception cref="T:System.NullReferenceException">The <see cref="T:System.Runtime.CompilerServices.TaskAwaiter`1" /> object was not properly initialized.</exception>
|
|
/// <exception cref="T:System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
|
|
/// <exception cref="T:System.Exception">The task completed in a <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" /> state.</exception>
|
|
// Token: 0x06002C58 RID: 11352 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002C58")]
|
|
[Address(RVA = "0x2F02CE0", Offset = "0x2F01CE0", VA = "0x182F02CE0")]
|
|
public TResult GetResult()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04001947 RID: 6471
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001947")]
|
|
private readonly Task<TResult> m_task;
|
|
}
|
|
}
|