HtmlFormParameterWriter 类

定义

编写使用 HTTP 实现的 Web 服务的传出请求参数,参数的名称/值对编码为类似 HTML 格式而不是编码为 SOAP 消息。Writes outgoing request parameters for Web services implemented using HTTP with name-value pairs encoded like an HTML form rather than as a SOAP message.

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

注解

HtmlFormParameterWriterSystem.Web.Services.Protocols命名空间中的其他类通过 HTTP GET 和 http POST 操作支持 Web 服务的 .NET Framework 实现。HtmlFormParameterWriter 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 标准交换消息。客户HtmlFormParameterWriter端类提供一些方法, 用于将参数名称-值对写入到带有 MIME 类型application/x-www-form-urlencoded的 HTTP 请求的正文中。Web service writers and readers use HTTP for transport but don't exchange messages using the SOAP standard.The client-side HtmlFormParameterWriter class provides methods to write parameter name-value pairs to the body of an HTTP request with the MIME type application/x-www-form-urlencoded.

通常不需要直接使用HtmlFormParameterWriterYou typically will not need to use HtmlFormParameterWriter directly. 当 wsdl.exe 工具根据 HTTP POST 实现生成客户端代理代码时, 它将应用HttpMethodAttribute于每个 Web 方法并将该属性的ParameterFormatter属性设置为HtmlFormParameterWriterWhen the Wsdl.exe tool generates client proxy code according to the HTTP-POST implementation, it applies the HttpMethodAttribute to each Web method and sets the attribute's ParameterFormatter property to HtmlFormParameterWriter.

构造函数

HtmlFormParameterWriter()

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

属性

RequestEncoding

获取或设置用于将参数写入到 HTTP 请求的编码。Gets or sets the encoding used to write parameters to the HTTP request.

(继承自 UrlEncodedParameterWriter)
UsesWriteRequest

获取一个值,该值指示是否将 Web 方法参数值序列化到传出 HTTP 请求的正文中。Gets a value that indicates whether Web method parameter values are serialized to the outgoing HTTP request body.

方法

Encode(TextWriter, Object[])

对 Web 方法的所有参数值进行编码,然后将它们写入指定编写器。Encodes all the parameter values for a Web method and writes them to the specified writer.

(继承自 UrlEncodedParameterWriter)
Encode(TextWriter, String, Object)

对指定参数值进行编码,然后将它写入指定编写器。Encodes a specified parameter value and writes it to the specified writer.

(继承自 UrlEncodedParameterWriter)
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.

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

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

(继承自 MimeFormatter)
GetRequestUrl(String, Object[])

在派生类中重写时,修改传出 HTTP 请求的统一请求定位符 (URL)。When overridden in a derived class, modifies the outgoing HTTP request's Uniform Request Locator (URL).

(继承自 MimeParameterWriter)
GetType()

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

(继承自 Object)
Initialize(Object)

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

(继承自 UrlEncodedParameterWriter)
InitializeRequest(WebRequest, Object[])

初始化传出的 HTTP 请求。Initializes the outgoing HTTP request.

MemberwiseClone()

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

(继承自 Object)
ToString()

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

(继承自 Object)
WriteRequest(Stream, Object[])

将 Web 方法参数值序列化为表示传出 HTTP 请求的正文的流。Serializes Web method parameter values into a stream representing the outgoing HTTP request body.

适用于

另请参阅