Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EndGetRequestStream() [1/2]

override Stream System.Net.HttpWebRequest.EndGetRequestStream ( IAsyncResult asyncResult)
inlinevirtual

Reimplemented from System.Net.WebRequest.

Definition at line 933 of file HttpWebRequest.cs.

934 {
935 CheckAbort();
936 if (asyncResult == null || !(asyncResult is Task<Stream>))
937 {
938 throw new ArgumentException(System.SR.net_io_invalidasyncresult, "asyncResult");
939 }
941 {
942 throw new InvalidOperationException(System.SR.Format(System.SR.net_io_invalidendcall, "EndGetRequestStream"));
943 }
944 try
945 {
946 return ((Task<Stream>)asyncResult).GetAwaiter().GetResult();
947 }
948 catch (Exception exception)
949 {
950 throw WebException.CreateCompatibleException(exception);
951 }
952 }
static string net_io_invalidendcall
Definition SR.cs:22
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string net_io_invalidasyncresult
Definition SR.cs:20
Definition SR.cs:7
static int Exchange(ref int location1, int value)

References System.Net.HttpWebRequest._endGetRequestStreamCalled, System.asyncResult, System.Net.HttpWebRequest.CheckAbort(), System.Net.WebException.CreateCompatibleException(), System.Runtime.Serialization.Dictionary, System.exception, System.Threading.Interlocked.Exchange(), System.SR.Format(), System.SR.net_io_invalidasyncresult, and System.SR.net_io_invalidendcall.