WebResponse 成员

提供来自统一资源标识符 (URI) 的响应。这是一个 abstract 类。

下表列出了由 WebResponse 类型公开的成员。

受保护的构造函数

  名称 说明
Protected method Supported by the .NET Compact Framework WebResponse 已重载。初始化 WebResponse 类的新实例。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework ContentLength 当在子类中重写时,获取或设置接收的数据的内容长度。
Public property Supported by the .NET Compact Framework ContentType 当在派生类中重写时,获取或设置接收的数据的内容类型。
Public property Supported by the .NET Compact Framework Headers 当在派生类中重写时,获取与此请求关联的标头名称/值对的集合。
Public property IsFromCache 获取一个 Boolean 值,该值指示此响应是否为从缓存中获取的。
Public property IsMutuallyAuthenticated 获取一个 Boolean 值,该值指示是否发生了相互身份验证。
Public property Supported by the .NET Compact Framework ResponseUri 当在派生类中重写时,获取实际响应此请求的 Internet 资源的 URI。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Close 当由子类重写时,将关闭响应流。
Public method CreateObjRef  创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (从 MarshalByRefObject 继承。)
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method GetLifetimeService  检索控制此实例的生存期策略的当前生存期服务对象。 (从 MarshalByRefObject 继承。)
Public method Supported by the .NET Compact Framework GetResponseStream 当在子类中重写时,从 Internet 资源返回数据流。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method InitializeLifetimeService  获取控制此实例的生存期策略的生存期服务对象。 (从 MarshalByRefObject 继承。)
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method GetObjectData 使用序列化目标对象所需的数据填充 SerializationInfo
Protected method Supported by the .NET Compact Framework MemberwiseClone  已重载。 (从 MarshalByRefObject 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method Supported by the .NET Compact Framework System.IDisposable.Dispose 当在派生类中被重写时,释放 WebResponse 使用的所有资源。
Explicit interface implementation Method System.Runtime.Serialization.ISerializable.GetObjectData 使用序列化 WebResponse 所需的数据来填充 SerializationInfo 实例。

页首

请参见

参考

WebResponse 类
System.Net 命名空间