-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
Microsoft.Bcl.AsyncInterfaces.cs
96 lines (95 loc) · 5.39 KB
/
Microsoft.Bcl.AsyncInterfaces.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System
{
public partial interface IAsyncDisposable
{
System.Threading.Tasks.ValueTask DisposeAsync();
}
}
namespace System.Collections.Generic
{
public partial interface IAsyncEnumerable<out T>
{
System.Collections.Generic.IAsyncEnumerator<T> GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
public partial interface IAsyncEnumerator<out T> : System.IAsyncDisposable
{
T Current { get; }
System.Threading.Tasks.ValueTask<bool> MoveNextAsync();
}
}
namespace System.Runtime.CompilerServices
{
public partial struct AsyncIteratorMethodBuilder
{
private object _dummy;
private int _dummyPrimitive;
public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
public void Complete() { }
public static System.Runtime.CompilerServices.AsyncIteratorMethodBuilder Create() { throw null; }
public void MoveNext<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)]
public sealed partial class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute
{
public AsyncIteratorStateMachineAttribute(System.Type stateMachineType) : base (default(System.Type)) { }
}
public readonly partial struct ConfiguredAsyncDisposable
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; }
}
public readonly partial struct ConfiguredCancelableAsyncEnumerable<T>
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(bool continueOnCapturedContext) { throw null; }
public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T>.Enumerator GetAsyncEnumerator() { throw null; }
public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> WithCancellation(System.Threading.CancellationToken cancellationToken) { throw null; }
public readonly partial struct Enumerator
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public T Current { get { throw null; } }
public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; }
public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<bool> MoveNextAsync() { throw null; }
}
}
[System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited=false)]
public sealed partial class EnumeratorCancellationAttribute : System.Attribute
{
public EnumeratorCancellationAttribute() { }
}
}
namespace System.Threading.Tasks
{
public static partial class TaskAsyncEnumerableExtensions
{
public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait(this System.IAsyncDisposable source, bool continueOnCapturedContext) { throw null; }
public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait<T>(this System.Collections.Generic.IAsyncEnumerable<T> source, bool continueOnCapturedContext) { throw null; }
public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> WithCancellation<T>(this System.Collections.Generic.IAsyncEnumerable<T> source, System.Threading.CancellationToken cancellationToken) { throw null; }
}
}
namespace System.Threading.Tasks.Sources
{
public partial struct ManualResetValueTaskSourceCore<TResult>
{
private TResult _result;
private object _dummy;
private int _dummyPrimitive;
public bool RunContinuationsAsynchronously { readonly get { throw null; } set { } }
public short Version { get { throw null; } }
public TResult GetResult(short token) { throw null; }
public System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(short token) { throw null; }
public void OnCompleted(System.Action<object?> continuation, object? state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags) { }
public void Reset() { }
public void SetException(System.Exception error) { }
public void SetResult(TResult result) { }
}
}