FileWebResponse 類別

定義

提供 WebResponse 類別的檔案系統實作。

public ref class FileWebResponse : System::Net::WebResponse, System::Runtime::Serialization::ISerializable
public ref class FileWebResponse : System::Net::WebResponse, IDisposable, System::Runtime::Serialization::ISerializable
public ref class FileWebResponse : System::Net::WebResponse
public class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
[System.Serializable]
public class FileWebResponse : System.Net.WebResponse, IDisposable, System.Runtime.Serialization.ISerializable
[System.Serializable]
public class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
public class FileWebResponse : System.Net.WebResponse
type FileWebResponse = class
    inherit WebResponse
    interface ISerializable
[<System.Serializable>]
type FileWebResponse = class
    inherit WebResponse
    interface ISerializable
    interface IDisposable
[<System.Serializable>]
type FileWebResponse = class
    inherit WebResponse
    interface ISerializable
Public Class FileWebResponse
Inherits WebResponse
Implements ISerializable
Public Class FileWebResponse
Inherits WebResponse
Implements IDisposable, ISerializable
Public Class FileWebResponse
Inherits WebResponse
繼承
屬性
實作

備註

類別 FileWebResponse 會實作基類, WebResponseabstract 以傳回 類別的 FileWebRequest 檔案系統資源。

用戶端應用程式不會直接建立 FileWebResponse 實例;而是藉由在 實例上 FileWebRequest 呼叫 GetResponse 方法來建立它們。

方法 GetResponseStream 會傳 Stream 回實例,提供檔案系統資源的唯讀存取權。

類別 FileWebResponse 依賴 File 類別來處理錯誤和程式碼存取安全性。

建構函式

FileWebResponse(SerializationInfo, StreamingContext)
已淘汰.
已淘汰.
已淘汰.

初始化 FileWebResponse 類別的新執行個體,這個執行個體是來自 SerializationInfoStreamingContext 類別的指定執行個體。

屬性

ContentLength

取得檔案系統資源內容的長度。

ContentType

取得檔案系統資源的內容類型。

Headers

取得與回應相關聯標頭名稱/值組的集合。

IsFromCache

取得 Boolean 值,指出這個回應是否從快取中取得。

(繼承來源 WebResponse)
IsMutuallyAuthenticated

取得 Boolean 值,指出是否發生過相互驗證。

(繼承來源 WebResponse)
ResponseUri

取得提供回應的檔案系統資源 URI。

SupportsHeaders

取得值,這個值表示 Headers 執行個體是否支援 FileWebResponse 屬性。

SupportsHeaders

取得指出是否支援標頭的值。

(繼承來源 WebResponse)

方法

Close()

關閉回應資料流。

CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。

(繼承來源 MarshalByRefObject)
Dispose()

釋放由 WebResponse 物件使用的 Unmanaged 資源。

(繼承來源 WebResponse)
Dispose(Boolean)

釋放 FileWebResponse 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

Dispose(Boolean)

釋放 WebResponse 物件所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。

(繼承來源 WebResponse)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetLifetimeService()
已淘汰.

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。

(繼承來源 MarshalByRefObject)
GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

將序列化目標物件所需的資料填入 SerializationInfo

GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

將序列化目標物件所需的資料填入 SerializationInfo

(繼承來源 WebResponse)
GetResponseStream()

從檔案系統資源傳回資料流。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
InitializeLifetimeService()
已淘汰.

取得存留期服務物件,以控制這個執行個體的存留期原則。

(繼承來源 MarshalByRefObject)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。

(繼承來源 MarshalByRefObject)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

IDisposable.Dispose()

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

釋放 FileWebResponse 所使用的所有資源。

IDisposable.Dispose()

在衍生類別中覆寫時,釋放 WebResponse 使用的所有資源。

(繼承來源 WebResponse)
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

以序列化 SerializationInfo 所需的資料填入 FileWebResponse 執行個體。

適用於