C# Класс System.Net.FtpWebRequest

The FtpWebRequest class implements a basic FTP client interface.

Наследование: WebRequest
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AsyncRequestCallback void
AttemptedRecovery bool
CheckError void
CreateConnection FtpControlStream
CreateConnectionAsync void
DataStreamClosed void
EnsureFtpWebResponse void
FinishRequestStage RequestStage
FtpWebRequest
FtpWebRequest System.Diagnostics
GetUserString string
RequestCallback void
SetException void
SubmitRequest void
SyncRequestCallback void
TimedSubmitRequestHelper System.IO.Stream
TimerCallback void
TranslateConnectException Exception

Открытые методы

Метод Описание
Abort ( ) : void
BeginGetRequestStream ( AsyncCallback callback, object state ) : IAsyncResult

Used to query for the Request stream of an FTP Request [async version]

BeginGetRequestStream ( System callback, object state ) : System.IAsyncResult
BeginGetResponse ( AsyncCallback callback, object state ) : IAsyncResult

Used to query for the Response of an FTP request [async version]

BeginGetResponse ( System callback, object state ) : System.IAsyncResult
EndGetRequestStream ( IAsyncResult asyncResult ) : Stream
EndGetRequestStream ( System asyncResult ) : System.IO.Stream
EndGetResponse ( System asyncResult ) : System.Net.WebResponse
EndGetResponse ( IAsyncResult asyncResult ) : WebResponse

Returns result of query for the Response of an FTP request [async version]

GetRequestStream ( ) : Stream

Used to query for the Request stream of an FTP Request

GetRequestStream ( ) : System.IO.Stream
GetResponse ( ) : System.Net.WebResponse
GetResponse ( ) : WebResponse

Приватные методы

Метод Описание
AsyncRequestCallback ( object obj ) : void
AttemptedRecovery ( Exception e ) : bool

Returns true if we should restart the request after an error

CheckError ( ) : void

Opposite of SetException, rethrows the exception

CreateConnection ( ) : FtpControlStream
CreateConnectionAsync ( ) : void
DataStreamClosed ( CloseExState closeState ) : void
EnsureFtpWebResponse ( Exception exception ) : void

Creates an FTP WebResponse based off the responseStream and our active Connection

FinishRequestStage ( RequestStage stage ) : RequestStage
FtpWebRequest ( )
FtpWebRequest ( Uri uri ) : System.Diagnostics
GetUserString ( ) : string

Returns username string

RequestCallback ( object obj ) : void
SetException ( Exception exception ) : void

Updates and sets our exception to be thrown

SubmitRequest ( bool isAsync ) : void
SyncRequestCallback ( object obj ) : void
TimedSubmitRequestHelper ( bool isAsync ) : Stream
TimerCallback ( TimerThread timer, int timeNoticed, object context ) : void

Because this is called from the timer thread, neither it nor any methods it calls can call user code.

TranslateConnectException ( Exception e ) : Exception

Описание методов

Abort() публичный Метод

public Abort ( ) : void
Результат void

BeginGetRequestStream() публичный Метод

Used to query for the Request stream of an FTP Request [async version]

public BeginGetRequestStream ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback
state object
Результат IAsyncResult

BeginGetRequestStream() публичный Метод

public BeginGetRequestStream ( System callback, object state ) : System.IAsyncResult
callback System
state object
Результат System.IAsyncResult

BeginGetResponse() публичный Метод

Used to query for the Response of an FTP request [async version]

public BeginGetResponse ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback
state object
Результат IAsyncResult

BeginGetResponse() публичный Метод

public BeginGetResponse ( System callback, object state ) : System.IAsyncResult
callback System
state object
Результат System.IAsyncResult

EndGetRequestStream() публичный Метод

public EndGetRequestStream ( IAsyncResult asyncResult ) : Stream
asyncResult IAsyncResult
Результат System.IO.Stream

EndGetRequestStream() публичный Метод

public EndGetRequestStream ( System asyncResult ) : System.IO.Stream
asyncResult System
Результат System.IO.Stream

EndGetResponse() публичный Метод

public EndGetResponse ( System asyncResult ) : System.Net.WebResponse
asyncResult System
Результат System.Net.WebResponse

EndGetResponse() публичный Метод

Returns result of query for the Response of an FTP request [async version]

public EndGetResponse ( IAsyncResult asyncResult ) : WebResponse
asyncResult IAsyncResult
Результат WebResponse

GetRequestStream() публичный Метод

Used to query for the Request stream of an FTP Request

public GetRequestStream ( ) : Stream
Результат System.IO.Stream

GetRequestStream() публичный Метод

public GetRequestStream ( ) : System.IO.Stream
Результат System.IO.Stream

GetResponse() публичный Метод

public GetResponse ( ) : System.Net.WebResponse
Результат System.Net.WebResponse

GetResponse() публичный Метод

public GetResponse ( ) : WebResponse
Результат WebResponse