FileWebResponse 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供 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 和 SerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。 |
属性
ContentLength |
获取文件系统资源中的内容长度。 |
ContentType |
获取文件系统资源的内容类型。 |
Headers |
获取与响应关联的标头名称/值对集合。 |
IsFromCache |
获取一个 Boolean 值,该值指示此响应是否为从缓存中获取的。 (继承自 WebResponse) |
IsMutuallyAuthenticated |
获取一个 Boolean 值,该值指示是否发生了相互身份验证。 (继承自 WebResponse) |
ResponseUri |
获取提供响应的文件系统资源的 URI。 |
SupportsHeaders |
获取一个值,该值指示 Headers 属性是否由 FileWebResponse 实例支持。 |
SupportsHeaders |
获取指示是否支持标题的值。 (继承自 WebResponse) |
方法
Close() |
关闭响应流。 |
CreateObjRef(Type) |
创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (继承自 MarshalByRefObject) |
Dispose() |
释放 WebResponse 对象使用的非托管资源。 (继承自 WebResponse) |
Dispose(Boolean) |
释放由 FileWebResponse 占用的非托管资源,还可以另外再释放托管资源。 |
Dispose(Boolean) |
释放由 WebResponse 对象使用的非托管资源,并可根据需要释放托管资源。 (继承自 WebResponse) |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
GetHashCode() |
作为默认哈希函数。 (继承自 Object) |
GetLifetimeService() |
已过时.
检索控制此实例的生存期策略的当前生存期服务对象。 (继承自 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 实例。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈