Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.2.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

140 lines
6.2 KiB
C#

using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Cpp2IlInjected;
namespace System.Runtime.CompilerServices
{
/// <summary>Represents a builder for asynchronous methods that returns a task and provides a parameter for the result.</summary>
/// <typeparam name="TResult">The result to use to complete the task.</typeparam>
// Token: 0x02000551 RID: 1361
[Token(Token = "0x2000551")]
public struct AsyncTaskMethodBuilder<TResult>
{
/// <summary>Creates an instance of the <see cref="T:System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1" /> class.</summary>
/// <returns>A new instance of the builder.</returns>
// Token: 0x06002C19 RID: 11289 RVA: 0x00018BD0 File Offset: 0x00016DD0
[Token(Token = "0x6002C19")]
[Address(RVA = "0x437C30", Offset = "0x436C30", VA = "0x180437C30")]
public static AsyncTaskMethodBuilder<TResult> Create()
{
return default(AsyncTaskMethodBuilder<TResult>);
}
/// <summary>Begins running the builder with the associated state machine.</summary>
/// <param name="stateMachine">The state machine instance, passed by reference.</param>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="stateMachine" /> is <see langword="null" />.</exception>
// Token: 0x06002C1A RID: 11290 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C1A")]
[Address(RVA = "0x2505880", Offset = "0x2504880", VA = "0x182505880")]
[DebuggerStepThrough]
public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
{
}
/// <summary>Associates the builder with the specified state machine.</summary>
/// <param name="stateMachine">The state machine instance to associate with the builder.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="stateMachine" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The state machine was previously set.</exception>
// Token: 0x06002C1B RID: 11291 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C1B")]
[Address(RVA = "0x2F2CA10", Offset = "0x2F2BA10", VA = "0x182F2CA10")]
public void SetStateMachine(IAsyncStateMachine stateMachine)
{
}
/// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
/// <param name="awaiter">The awaiter.</param>
/// <param name="stateMachine">The state machine.</param>
/// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
// Token: 0x06002C1C RID: 11292 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C1C")]
[Address(RVA = "0x24FF470", Offset = "0x24FE470", VA = "0x1824FF470")]
public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
{
}
/// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes. This method can be called from partially trusted code.</summary>
/// <param name="awaiter">The awaiter.</param>
/// <param name="stateMachine">The state machine.</param>
/// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
// Token: 0x06002C1D RID: 11293 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C1D")]
[Address(RVA = "0x2503CF0", Offset = "0x2502CF0", VA = "0x182503CF0")]
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
{
}
/// <summary>Gets the task for this builder.</summary>
/// <returns>The task for this builder.</returns>
// Token: 0x170006B4 RID: 1716
// (get) Token: 0x06002C1E RID: 11294 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170006B4")]
public Task<TResult> Task
{
[Token(Token = "0x6002C1E")]
[Address(RVA = "0x2F2D490", Offset = "0x2F2C490", VA = "0x182F2D490")]
get
{
return null;
}
}
/// <summary>Marks the task as successfully completed.</summary>
/// <param name="result">The result to use to complete the task.</param>
/// <exception cref="T:System.InvalidOperationException">The task has already completed.</exception>
// Token: 0x06002C1F RID: 11295 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C1F")]
[Address(RVA = "0x2F2B760", Offset = "0x2F2A760", VA = "0x182F2B760")]
public void SetResult(TResult result)
{
}
// Token: 0x06002C20 RID: 11296 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C20")]
[Address(RVA = "0x2F2B950", Offset = "0x2F2A950", VA = "0x182F2B950")]
internal void SetResult(Task<TResult> completedTask)
{
}
/// <summary>Marks the task as failed and binds the specified exception to the task.</summary>
/// <param name="exception">The exception to bind to the task.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="exception" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The task has already completed.</exception>
// Token: 0x06002C21 RID: 11297 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002C21")]
[Address(RVA = "0x2F2ACD0", Offset = "0x2F29CD0", VA = "0x182F2ACD0")]
public void SetException(Exception exception)
{
}
// Token: 0x06002C22 RID: 11298 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002C22")]
[Address(RVA = "0x2F23860", Offset = "0x2F22860", VA = "0x182F23860")]
private Task<TResult> GetTaskForResult(TResult result)
{
return null;
}
// Token: 0x04001930 RID: 6448
[Token(Token = "0x4001930")]
internal static readonly Task<TResult> s_defaultResultTask;
// Token: 0x04001931 RID: 6449
[FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001931")]
private AsyncMethodBuilderCore m_coreState;
// Token: 0x04001932 RID: 6450
[FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001932")]
private Task<TResult> m_task;
}
}