18 references to FromException
Microsoft.AspNetCore.Server.HttpSys (1)
AsyncAcceptContext.cs (1)
54return ValueTask.FromException<RequestContext>(new HttpSysException((int)statusCode));
System.Data.Common (1)
System\Data\Common\DbConnection.cs (1)
80return ValueTask.FromException<DbTransaction>(e);
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
1525public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken) => ValueTask.FromException<int>(new NotSupportedException(SR.net_http_content_writeonly_stream)); 1611return ValueTask.FromException<int>(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(nameof(Http2ReadStream))));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
1479return ValueTask.FromException<int>(new ObjectDisposedException(nameof(Http3RequestStream)));
System.Net.Sockets (7)
System\Net\Sockets\Socket.Tasks.cs (7)
1060ValueTask.FromException<Socket>(CreateException(error)); 1080ValueTask.FromException<int>(CreateException(error)); 1099ValueTask.FromException<SocketReceiveFromResult>(CreateException(error)); 1117ValueTask.FromException<int>(CreateException(error)); 1138ValueTask.FromException<SocketReceiveMessageFromResult>(CreateException(error)); 1158ValueTask.FromException<int>(CreateException(error)); 1210ValueTask.FromException<int>(CreateException(error));
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
395return ValueTask.FromException<ValueWebSocketReceiveResult>(exc);
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (1)
422return ValueTask.FromException<int>(exception);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (1)
473return ValueTask.FromException<int>(ex);
System.Security.Cryptography (1)
System\Security\Cryptography\CryptoStream.cs (1)
227return ValueTask.FromException<int>(new NotSupportedException(SR.NotSupported_UnreadableStream));
System.Threading.Channels (2)
System\Threading\Channels\UnboundedPriorityChannel.cs (2)
172ValueTask.FromException<bool>(parent._doneWriting) : 312doneWriting != ChannelUtilities.s_doneWritingSentinel ? ValueTask.FromException<bool>(doneWriting) :