238 lines
17 KiB
C#
238 lines
17 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Threading.Tasks
|
|
{
|
|
/// <summary>Provides support for creating and scheduling <see cref="T:System.Threading.Tasks.Task" /> objects.</summary>
|
|
// Token: 0x020003AE RID: 942
|
|
[Token(Token = "0x20003AE")]
|
|
public class TaskFactory
|
|
{
|
|
// Token: 0x06002205 RID: 8709 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002205")]
|
|
[Address(RVA = "0xB48350", Offset = "0xB47350", VA = "0x180B48350")]
|
|
private TaskScheduler GetDefaultScheduler(Task currTask)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Initializes a <see cref="T:System.Threading.Tasks.TaskFactory" /> instance with the default configuration.</summary>
|
|
// Token: 0x06002206 RID: 8710 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002206")]
|
|
[Address(RVA = "0xB48780", Offset = "0xB47780", VA = "0x180B48780")]
|
|
public TaskFactory()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a <see cref="T:System.Threading.Tasks.TaskFactory" /> instance with the specified configuration.</summary>
|
|
/// <param name="cancellationToken">The default <see cref="P:System.Threading.Tasks.TaskFactory.CancellationToken" /> that will be assigned to tasks created by this <see cref="T:System.Threading.Tasks.TaskFactory" /> unless another CancellationToken is explicitly specified while calling the factory methods.</param>
|
|
/// <param name="creationOptions">The default <see cref="T:System.Threading.Tasks.TaskCreationOptions" /> to use when creating tasks with this TaskFactory.</param>
|
|
/// <param name="continuationOptions">The default <see cref="T:System.Threading.Tasks.TaskContinuationOptions" /> to use when creating continuation tasks with this TaskFactory.</param>
|
|
/// <param name="scheduler">The default <see cref="T:System.Threading.Tasks.TaskScheduler" /> to use to schedule any Tasks created with this TaskFactory. A null value indicates that TaskScheduler.Current should be used.</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="creationOptions" /> argument specifies an invalid <see cref="T:System.Threading.Tasks.TaskCreationOptions" /> value. For more information, see the Remarks for <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.Func{System.AsyncCallback,System.Object,System.IAsyncResult},System.Action{System.IAsyncResult},System.Object,System.Threading.Tasks.TaskCreationOptions)" />.
|
|
/// -or-
|
|
/// The <paramref name="continuationOptions" /> argument specifies an invalid value.</exception>
|
|
// Token: 0x06002207 RID: 8711 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002207")]
|
|
[Address(RVA = "0xB485E0", Offset = "0xB475E0", VA = "0x180B485E0")]
|
|
public TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002208 RID: 8712 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002208")]
|
|
[Address(RVA = "0xB47EC0", Offset = "0xB46EC0", VA = "0x180B47EC0")]
|
|
internal static void CheckCreationOptions(TaskCreationOptions creationOptions)
|
|
{
|
|
}
|
|
|
|
/// <summary>Creates and starts a <see cref="T:System.Threading.Tasks.Task" />.</summary>
|
|
/// <param name="action">The action delegate to execute asynchronously.</param>
|
|
/// <param name="cancellationToken">The <see cref="P:System.Threading.Tasks.TaskFactory.CancellationToken" /> that will be assigned to the new <see cref="T:System.Threading.Tasks.Task" /></param>
|
|
/// <param name="creationOptions">A TaskCreationOptions value that controls the behavior of the created <see cref="T:System.Threading.Tasks.Task" /></param>
|
|
/// <param name="scheduler">The <see cref="T:System.Threading.Tasks.TaskScheduler" /> that is used to schedule the created <see cref="T:System.Threading.Tasks.Task" />.</param>
|
|
/// <returns>The started <see cref="T:System.Threading.Tasks.Task" />.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="T:System.Threading.CancellationToken" /> has already been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="action" /> argument is null.
|
|
/// -or-
|
|
/// The exception that is thrown when the <paramref name="scheduler" /> argument is null.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. For more information, see the Remarks for <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.Func{System.AsyncCallback,System.Object,System.IAsyncResult},System.Action{System.IAsyncResult},System.Object,System.Threading.Tasks.TaskCreationOptions)" /></exception>
|
|
// Token: 0x06002209 RID: 8713 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002209")]
|
|
[Address(RVA = "0xB48530", Offset = "0xB47530", VA = "0x180B48530")]
|
|
public Task StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates and starts a <see cref="T:System.Threading.Tasks.Task" />.</summary>
|
|
/// <param name="action">The action delegate to execute asynchronously.</param>
|
|
/// <param name="state">An object containing data to be used by the <paramref name="action" /> delegate.</param>
|
|
/// <param name="cancellationToken">The <see cref="P:System.Threading.Tasks.TaskFactory.CancellationToken" /> that will be assigned to the new task.</param>
|
|
/// <param name="creationOptions">A TaskCreationOptions value that controls the behavior of the created <see cref="T:System.Threading.Tasks.Task" /></param>
|
|
/// <param name="scheduler">The <see cref="T:System.Threading.Tasks.TaskScheduler" /> that is used to schedule the created <see cref="T:System.Threading.Tasks.Task" />.</param>
|
|
/// <returns>The started <see cref="T:System.Threading.Tasks.Task" />.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="T:System.Threading.CancellationToken" /> has already been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="action" /> argument is null.
|
|
/// -or-
|
|
/// The exception that is thrown when the <paramref name="scheduler" /> argument is null.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. For more information, see the Remarks for <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.Func{System.AsyncCallback,System.Object,System.IAsyncResult},System.Action{System.IAsyncResult},System.Object,System.Threading.Tasks.TaskCreationOptions)" /></exception>
|
|
// Token: 0x0600220A RID: 8714 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600220A")]
|
|
[Address(RVA = "0xB48470", Offset = "0xB47470", VA = "0x180B48470")]
|
|
public Task StartNew(Action<object> action, object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates and starts a <see cref="T:System.Threading.Tasks.Task`1" />.</summary>
|
|
/// <param name="function">A function delegate that returns the future result to be available through the <see cref="T:System.Threading.Tasks.Task`1" />.</param>
|
|
/// <param name="state">An object containing data to be used by the <paramref name="function" /> delegate.</param>
|
|
/// <typeparam name="TResult">The type of the result available through the <see cref="T:System.Threading.Tasks.Task`1" />.</typeparam>
|
|
/// <returns>The started <see cref="T:System.Threading.Tasks.Task`1" />.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="function" /> argument is null.</exception>
|
|
// Token: 0x0600220B RID: 8715 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600220B")]
|
|
[Address(RVA = "0x25FE7E0", Offset = "0x25FD7E0", VA = "0x1825FE7E0")]
|
|
public Task<TResult> StartNew<TResult>(Func<object, TResult> function, object state)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates and starts a <see cref="T:System.Threading.Tasks.Task`1" />.</summary>
|
|
/// <param name="function">A function delegate that returns the future result to be available through the <see cref="T:System.Threading.Tasks.Task`1" />.</param>
|
|
/// <param name="state">An object containing data to be used by the <paramref name="function" /> delegate.</param>
|
|
/// <param name="cancellationToken">The <see cref="P:System.Threading.Tasks.TaskFactory.CancellationToken" /> that will be assigned to the new task.</param>
|
|
/// <param name="creationOptions">A TaskCreationOptions value that controls the behavior of the created <see cref="T:System.Threading.Tasks.Task`1" />.</param>
|
|
/// <param name="scheduler">The <see cref="T:System.Threading.Tasks.TaskScheduler" /> that is used to schedule the created <see cref="T:System.Threading.Tasks.Task`1" />.</param>
|
|
/// <typeparam name="TResult">The type of the result available through the <see cref="T:System.Threading.Tasks.Task`1" />.</typeparam>
|
|
/// <returns>The started <see cref="T:System.Threading.Tasks.Task`1" />.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="T:System.Threading.CancellationToken" /> has already been disposed.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="function" /> argument is null.
|
|
/// -or-
|
|
/// The exception that is thrown when the <paramref name="scheduler" /> argument is null.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. For more information, see the Remarks for <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.Func{System.AsyncCallback,System.Object,System.IAsyncResult},System.Action{System.IAsyncResult},System.Object,System.Threading.Tasks.TaskCreationOptions)" /></exception>
|
|
// Token: 0x0600220C RID: 8716 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600220C")]
|
|
[Address(RVA = "0x25FECC0", Offset = "0x25FDCC0", VA = "0x1825FECC0")]
|
|
public Task<TResult> StartNew<TResult>(Func<object, TResult> function, object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates a <see cref="T:System.Threading.Tasks.Task" /> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.</summary>
|
|
/// <param name="beginMethod">The delegate that begins the asynchronous operation.</param>
|
|
/// <param name="endMethod">The delegate that ends the asynchronous operation.</param>
|
|
/// <param name="arg1">The first argument passed to the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <param name="arg2">The second argument passed to the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <param name="state">An object containing data to be used by the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <typeparam name="TArg1">The type of the second argument passed to <paramref name="beginMethod" /> delegate.</typeparam>
|
|
/// <typeparam name="TArg2">The type of the first argument passed to the <paramref name="beginMethod" /> delegate.</typeparam>
|
|
/// <returns>The created <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="beginMethod" /> argument is null.
|
|
/// -or-
|
|
/// The exception that is thrown when the <paramref name="endMethod" /> argument is null.</exception>
|
|
// Token: 0x0600220D RID: 8717 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600220D")]
|
|
[Address(RVA = "0x25FE760", Offset = "0x25FD760", VA = "0x1825FE760")]
|
|
public Task FromAsync<TArg1, TArg2>(Func<TArg1, TArg2, AsyncCallback, object, IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, object state)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates a <see cref="T:System.Threading.Tasks.Task" /> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.</summary>
|
|
/// <param name="beginMethod">The delegate that begins the asynchronous operation.</param>
|
|
/// <param name="endMethod">The delegate that ends the asynchronous operation.</param>
|
|
/// <param name="arg1">The first argument passed to the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <param name="arg2">The second argument passed to the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <param name="state">An object containing data to be used by the <paramref name="beginMethod" /> delegate.</param>
|
|
/// <param name="creationOptions">The TaskCreationOptions value that controls the behavior of the created <see cref="T:System.Threading.Tasks.Task" />.</param>
|
|
/// <typeparam name="TArg1">The type of the second argument passed to <paramref name="beginMethod" /> delegate.</typeparam>
|
|
/// <typeparam name="TArg2">The type of the first argument passed to the <paramref name="beginMethod" /> delegate.</typeparam>
|
|
/// <returns>The created <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown when the <paramref name="beginMethod" /> argument is null.
|
|
/// -or-
|
|
/// The exception that is thrown when the <paramref name="endMethod" /> argument is null.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. The exception that is thrown when the <paramref name="creationOptions" /> argument specifies an invalid TaskCreationOptions value. For more information, see the Remarks for <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.Func{System.AsyncCallback,System.Object,System.IAsyncResult},System.Action{System.IAsyncResult},System.Object,System.Threading.Tasks.TaskCreationOptions)" /></exception>
|
|
// Token: 0x0600220E RID: 8718 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600220E")]
|
|
[Address(RVA = "0x25FE740", Offset = "0x25FD740", VA = "0x1825FE740")]
|
|
public Task FromAsync<TArg1, TArg2>(Func<TArg1, TArg2, AsyncCallback, object, IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, object state, TaskCreationOptions creationOptions)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x0600220F RID: 8719 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600220F")]
|
|
[Address(RVA = "0xB47F30", Offset = "0xB46F30", VA = "0x180B47F30")]
|
|
internal static void CheckFromAsyncOptions(TaskCreationOptions creationOptions, bool hasBeginMethod)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002210 RID: 8720 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002210")]
|
|
[Address(RVA = "0xB48150", Offset = "0xB47150", VA = "0x180B48150")]
|
|
internal static Task<Task> CommonCWAnyLogic(IList<Task> tasks)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06002211 RID: 8721 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002211")]
|
|
[Address(RVA = "0xB48040", Offset = "0xB47040", VA = "0x180B48040")]
|
|
internal static void CheckMultiTaskContinuationOptions(TaskContinuationOptions continuationOptions)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400130D RID: 4877
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400130D")]
|
|
private CancellationToken m_defaultCancellationToken;
|
|
|
|
// Token: 0x0400130E RID: 4878
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400130E")]
|
|
private TaskScheduler m_defaultScheduler;
|
|
|
|
// Token: 0x0400130F RID: 4879
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400130F")]
|
|
private TaskCreationOptions m_defaultCreationOptions;
|
|
|
|
// Token: 0x04001310 RID: 4880
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x4001310")]
|
|
private TaskContinuationOptions m_defaultContinuationOptions;
|
|
|
|
// Token: 0x020003AF RID: 943
|
|
[Token(Token = "0x20003AF")]
|
|
internal sealed class CompleteOnInvokePromise : Task<Task>, ITaskCompletionAction
|
|
{
|
|
// Token: 0x06002212 RID: 8722 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002212")]
|
|
[Address(RVA = "0xB3F3C0", Offset = "0xB3E3C0", VA = "0x180B3F3C0")]
|
|
public CompleteOnInvokePromise(IList<Task> tasks)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002213 RID: 8723 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002213")]
|
|
[Address(RVA = "0xB3F1F0", Offset = "0xB3E1F0", VA = "0x180B3F1F0", Slot = "22")]
|
|
public void Invoke(Task completingTask)
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001311 RID: 4881
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4001311")]
|
|
private IList<Task> _tasks;
|
|
|
|
// Token: 0x04001312 RID: 4882
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4001312")]
|
|
private int m_firstTaskAlreadyCompleted;
|
|
}
|
|
}
|
|
}
|