UrlParameterReader 类

定义

读取使用 HTTP 实现的 Web 服务的传入请求参数,参数的名称/值对编码到 URL 请求字符串中,而不是编码为 SOAP 消息。Reads incoming request parameters for Web services implemented using HTTP with name-value pairs encoded in the URL's query string rather than as a SOAP message.

public ref class UrlParameterReader : System::Web::Services::Protocols::ValueCollectionParameterReader
public class UrlParameterReader : System.Web.Services.Protocols.ValueCollectionParameterReader
type UrlParameterReader = class
    inherit ValueCollectionParameterReader
Public Class UrlParameterReader
Inherits ValueCollectionParameterReader
继承

注解

UrlParameterReaderSystem.Web.Services.Protocols命名空间中的其他类通过 HTTP GET 和 http POST 操作支持 Web 服务的 .NET Framework 实现。UrlParameterReader and other classes in the System.Web.Services.Protocols namespace support the .NET Framework's implementations of Web services via the HTTP-GET and HTTP-POST operations. Web 服务编写器和读取器分别在参数或返回 Web 方法的对象和 HTTP 请求或响应流之间进行序列化和反序列化。Web service writers and readers serialize and deserialize, respectively, between the parameters or return objects of Web methods and the HTTP request or response streams. Web 服务编写器和读取器使用 HTTP 进行传输, 但不使用 SOAP 标准交换消息。Web service writers and readers use HTTP for transport but don't exchange messages using the SOAP standard.

类提供服务端方法, Read以读取编码到 HTTP 请求 URL 的查询字符串中的参数名称/值对。 UrlParameterReaderThe UrlParameterReader class provides a service-side method, Read, to read parameter name/value pairs that are encoded into an HTTP request URL's query string. http://contoso.com?a=1&b=2例如, 在 URL 中, ab是参数名称, 1并且和2是其值。For example, in the URL http://contoso.com?a=1&b=2, a and b are parameter names, and 1 and 2 are their values.

通常不需要直接使用UrlParameterReaderYou typically will not need to use UrlParameterReader directly. 当 ASP.NET 配置文件的 (web.config) protocols元素add包含名称特性值为 "HttpGet" 的元素时, 将启用 HTTP-获取 Web 服务。HTTP-GET Web services are enabled when an ASP.NET configuration file's (Web.config) protocols element contains an add element whose name attribute's value is "HttpGet". 当启用 http 获取 Web 服务并收到适用的 http 请求时, 将自动使用类。UrlParameterReaderThe UrlParameterReader class is automatically used when an HTTP-GET Web service is enabled and an applicable HTTP request is received.

构造函数

UrlParameterReader()

初始化 UrlParameterReader 类的新实例。Initializes a new instance of the UrlParameterReader class.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetInitializer(LogicalMethodInfo)

返回指定方法的初始值设定项。Returns an initializer for the specified method.

(继承自 ValueCollectionParameterReader)
GetInitializers(LogicalMethodInfo[])

在派生类中重写时,返回与方法定义的输入数组对应的初始值设定项对象的数组。When overridden in a derived class, returns an array of initializer objects corresponding to an input array of method definitions.

(继承自 MimeFormatter)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Initialize(Object)

初始化一个实例。Initializes an instance.

(继承自 ValueCollectionParameterReader)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Read(HttpRequest)

将编码到 HTTP 请求的查询字符串中的名称/值对读取为 Web 方法参数值。Reads name/value pairs encoded in the query string of an HTTP request into Web method parameter values.

Read(NameValueCollection)

将名称/值对的集合转换为表示方法参数值的对象数组。Translates a collection of name/value pairs into an array of objects representing method parameter values.

(继承自 ValueCollectionParameterReader)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅