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

◆ EndGetRequestStream()

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

Reimplemented from System.Net.WebRequest.

Definition at line 776 of file FtpWebRequest.cs.

777 {
778 Stream stream = null;
779 try
780 {
781 if (asyncResult == null)
782 {
783 throw new ArgumentNullException("asyncResult");
784 }
785 if (!(asyncResult is LazyAsyncResult lazyAsyncResult))
786 {
787 throw new ArgumentException(System.SR.net_io_invalidasyncresult, "asyncResult");
788 }
789 if (lazyAsyncResult.EndCalled)
790 {
792 }
793 lazyAsyncResult.InternalWaitForCompletion();
794 lazyAsyncResult.EndCalled = true;
795 CheckError();
796 stream = _stream;
797 lazyAsyncResult.EndCalled = true;
798 if (stream.CanTimeout)
799 {
800 stream.WriteTimeout = ReadWriteTimeout;
801 stream.ReadTimeout = ReadWriteTimeout;
802 }
803 }
804 catch (Exception message)
805 {
806 if (System.Net.NetEventSource.Log.IsEnabled())
807 {
808 System.Net.NetEventSource.Error(this, message, "EndGetRequestStream");
809 }
810 throw;
811 }
812 return stream;
813 }
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
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

References System.Net.FtpWebRequest._stream, System.asyncResult, System.Net.FtpWebRequest.CheckError(), System.Net.NetEventSource.Error(), System.SR.Format(), System.Net.NetEventSource.Log, System.SR.net_io_invalidasyncresult, System.SR.net_io_invalidendcall, System.Net.FtpWebRequest.ReadWriteTimeout, and System.stream.