22 implementations of IValueTaskSource
Microsoft.AspNetCore.Server.HttpSys (1)
AsyncAcceptContext.cs (1)
10
internal sealed unsafe partial class AsyncAcceptContext :
IValueTaskSource
<RequestContext>, IDisposable
Microsoft.AspNetCore.Server.IIS (3)
Core\IO\AsyncIOOperation.cs (1)
11
internal abstract class AsyncIOOperation :
IValueTaskSource
<int>, IValueTaskSource
Core\NativeSafeHandle.cs (1)
9
internal sealed class NativeSafeHandle : SafeHandle,
IValueTaskSource
<object?>
src\aspnetcore\src\Shared\ServerInfrastructure\ManualResetValueTaskSource.cs (1)
11
internal sealed class ManualResetValueTaskSource<T> :
IValueTaskSource
<T>, IValueTaskSource
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\ServerInfrastructure\ManualResetValueTaskSource.cs (1)
11
internal sealed class ManualResetValueTaskSource<T> :
IValueTaskSource
<T>, IValueTaskSource
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
TlsAwaitable.cs (1)
28
internal sealed class TlsAwaitable<T> :
IValueTaskSource
<T>
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\SocketAwaitableEventArgs.cs (1)
15
internal class SocketAwaitableEventArgs : SocketAsyncEventArgs,
IValueTaskSource
<SocketOperationResult>
System.IO.Pipelines (2)
System\IO\Pipelines\Pipe.DefaultPipeReader.cs (1)
13
private sealed class DefaultPipeReader : PipeReader,
IValueTaskSource
<ReadResult>
System\IO\Pipelines\Pipe.DefaultPipeWriter.cs (1)
13
private sealed class DefaultPipeWriter : PipeWriter,
IValueTaskSource
<FlushResult>
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (1)
12
internal sealed class CreditWaiter :
IValueTaskSource
<int>
System.Net.Sockets (4)
System\Net\Sockets\Socket.Tasks.cs (4)
977
internal sealed class AwaitableSocketAsyncEventArgs : SocketAsyncEventArgs, IValueTaskSource,
IValueTaskSource
<int>,
IValueTaskSource
<Socket>,
IValueTaskSource
<SocketReceiveFromResult>,
IValueTaskSource
<SocketReceiveMessageFromResult>
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (2)
30
internal sealed class ThreadPoolValueTaskSource : IThreadPoolWorkItem,
IValueTaskSource
<int>,
IValueTaskSource
<long>, IValueTaskSource
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (2)
246
internal abstract class StateMachineBox :
IValueTaskSource
<TResult>, IValueTaskSource
311
IValueTaskSource
<TResult>, IValueTaskSource, IAsyncStateMachineBox, IThreadPoolWorkItem
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
160
private sealed class State :
IValueTaskSource
<bool>
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
19
internal class SocketAwaitableEventArgs : SocketAsyncEventArgs,
IValueTaskSource
<int>, IValueTaskSource
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
19
internal class SocketAwaitableEventArgs : SocketAsyncEventArgs,
IValueTaskSource
<int>, IValueTaskSource
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
505
internal abstract class AsyncOperation<TSelf, TResult> : AsyncOperation<TSelf>,
IValueTaskSource
<TResult>
79 references to IValueTaskSource
mscorlib (1)
mscorlib.cs (1)
108
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.
IValueTaskSource
<>))]
netstandard (1)
netstandard.cs (1)
2113
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.
IValueTaskSource
<>))]
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (3)
97
int
IValueTaskSource
<int>.GetResult(short token) =>
99
ValueTaskSourceStatus
IValueTaskSource
<int>.GetStatus(short token) =>
101
void
IValueTaskSource
<int>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) =>
System.Net.Sockets (4)
System\Net\Sockets\Socket.Tasks.cs (4)
1247
int
IValueTaskSource
<int>.GetResult(short token)
1285
Socket
IValueTaskSource
<Socket>.GetResult(short token)
1307
SocketReceiveFromResult
IValueTaskSource
<SocketReceiveFromResult>.GetResult(short token)
1329
SocketReceiveMessageFromResult
IValueTaskSource
<SocketReceiveMessageFromResult>.GetResult(short token)
System.Private.CoreLib (66)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (3)
576
Debug.Assert(obj is
IValueTaskSource
<T>);
577
vtsCont.Initialize<T>(Unsafe.As<object,
IValueTaskSource
<T>>(ref obj), valueTask._token);
591
private static unsafe T Suspend<T>(
IValueTaskSource
<T> source, short token, bool continueOnCapturedContext)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.ValueTaskSourceContinuation.cs (7)
44
public void Initialize<T>(
IValueTaskSource
<T> source, short token)
68
Debug.Assert(source is
IValueTaskSource
<T>);
69
IValueTaskSource
<T> typedSource = Unsafe.As<object,
IValueTaskSource
<T>>(ref source);
75
Debug.Assert(source is
IValueTaskSource
<T>);
76
IValueTaskSource
<T> typedSource = Unsafe.As<object,
IValueTaskSource
<T>>(ref source);
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (1)
66
int
IValueTaskSource
<int>.GetResult(short token) => (int)GetResult(token);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.cs (6)
189
Debug.Assert(obj is
IValueTaskSource
<T>);
190
IValueTaskSource
<T> vts = Unsafe.As<object,
IValueTaskSource
<T>>(ref obj);
380
Debug.Assert(obj is
IValueTaskSource
<T>);
381
IValueTaskSource
<T> vts = Unsafe.As<object,
IValueTaskSource
<T>>(ref obj);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (6)
168
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
176
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
190
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
198
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
210
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
226
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ThreadPool.s_invokeAsyncStateMachineBox, box, _value._token,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (2)
296
TResult
IValueTaskSource
<TResult>.GetResult(short token) => throw NotImplemented.ByDesign;
455
TResult
IValueTaskSource
<TResult>.GetResult(short token)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ValueTaskAwaiter.cs (6)
140
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
148
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext | ValueTaskSourceOnCompletedFlags.FlowExecutionContext);
160
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
168
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
179
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
195
Unsafe.As<
IValueTaskSource
<TResult>>(obj).OnCompleted(ThreadPool.s_invokeAsyncStateMachineBox, box, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (4)
183
/// <summary>Core of the <see cref="
IValueTaskSource
{TResult}"/> implementation.</summary>
272
bool
IValueTaskSource
<bool>.GetResult(short token)
309
ValueTaskSourceStatus
IValueTaskSource
<bool>.GetStatus(short token) => _mrvtsc.GetStatus(token);
312
void
IValueTaskSource
<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\IValueTaskSource.cs (4)
8
/// <see cref="IValueTaskSource.OnCompleted"/> and <see cref="
IValueTaskSource
{TResult}.OnCompleted"/>
30
/// <summary>Indicates the status of an <see cref="IValueTaskSource"/> or <see cref="
IValueTaskSource
{TResult}"/>.</summary>
70
/// <summary>Schedules the continuation action for this <see cref="
IValueTaskSource
{TResult}"/>.</summary>
77
/// <summary>Gets the result of the <see cref="
IValueTaskSource
{TResult}"/>.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
10
/// <summary>Provides the core logic for implementing a manual-reset <see cref="IValueTaskSource"/> or <see cref="
IValueTaskSource
{TResult}"/>.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (26)
451
/// <see cref="ValueTask{TResult}"/> instances may be backed by <see cref="
IValueTaskSource
{TResult}"/> instances that are reusable, and such
458
/// was constructed from an <see cref="
IValueTaskSource
{TResult}"/>.
473
/// <summary>null if <see cref="_result"/> has the result, otherwise a <see cref="Task{TResult}"/> or a <see cref="
IValueTaskSource
{TResult}"/>.</summary>
477
/// <summary>Opaque value passed through to the <see cref="
IValueTaskSource
{TResult}"/>.</summary>
517
/// <summary>Initialize the <see cref="ValueTask{TResult}"/> with a <see cref="
IValueTaskSource
{TResult}"/> object that represents the operation.</summary>
521
public ValueTask(
IValueTaskSource
<TResult> source, short token)
586
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
598
return GetTaskForValueTaskSource(Unsafe.As<
IValueTaskSource
<TResult>>(obj));
604
/// <summary>Creates a <see cref="Task{TResult}"/> to represent the <see cref="
IValueTaskSource
{TResult}"/>.</summary>
606
/// The <see cref="
IValueTaskSource
{TResult}"/> is passed in rather than reading and casting <see cref="_obj"/>
609
private Task<TResult> GetTaskForValueTaskSource(
IValueTaskSource
<TResult> t)
649
/// <summary>Type used to create a <see cref="Task{TResult}"/> to represent a <see cref="
IValueTaskSource
{TResult}"/>.</summary>
655
vtst._source is not
IValueTaskSource
<TResult> source)
699
private
IValueTaskSource
<TResult>? _source;
703
public ValueTaskSourceAsTask(
IValueTaskSource
<TResult> source, short token)
718
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
730
return Unsafe.As<
IValueTaskSource
<TResult>>(obj).GetStatus(_token) != ValueTaskSourceStatus.Pending;
741
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
753
return Unsafe.As<
IValueTaskSource
<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Succeeded;
763
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
775
return Unsafe.As<
IValueTaskSource
<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Faulted;
781
/// If the <see cref="ValueTask{TResult}"/> is backed by a result or by a <see cref="
IValueTaskSource
{TResult}"/>,
790
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
802
return Unsafe.As<
IValueTaskSource
<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Canceled;
814
Debug.Assert(obj == null || obj is Task<TResult> || obj is
IValueTaskSource
<TResult>);
827
return Unsafe.As<
IValueTaskSource
<TResult>>(obj).GetResult(_token);
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
837
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.
IValueTaskSource
<>))]
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
79
int
IValueTaskSource
<int>.GetResult(short token)
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
79
int
IValueTaskSource
<int>.GetResult(short token)
System.Threading.Tasks.Extensions (1)
System.Threading.Tasks.Extensions.cs (1)
12
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.
IValueTaskSource
<>))]