PatternMatcher 类

定义

搜索 HTTP 响应文本以查找 Web 服务客户端的返回值。Searches HTTP response text for return values for Web service clients.

public ref class PatternMatcher sealed
public sealed class PatternMatcher
type PatternMatcher = class
Public NotInheritable Class PatternMatcher
继承
PatternMatcher

注解

PatternMatcher类使用正则表达式来执行模式匹配, 以在 HTTP 响应正文中编码的文本中查找 Web 方法返回值。The PatternMatcher class performs pattern matching using regular expressions to find Web method return values in text encoded in the body of an HTTP response. 类由客户端TextReturnReader类调用, 该类反序列化 Web 服务返回值。 PatternMatcherThe PatternMatcher class is called by the client-side TextReturnReader class, which deserializes Web service return values.

文本模式匹配为 Web 服务提供了一种检索 HTML 内容的方式, 而无需将其转换为必须绑定到 XML 架构定义的 XML 文档。Text pattern matching provides a way for Web services to retrieve HTML content without converting it to XML documents that must be bound to XML Schema definitions. 正则表达式搜索目标是通过match元素中text的 XML 元素在 Web 服务描述语言 (WSDL) 文档中指定的。Regular expression search targets are specified in a Web Services Description Language (WSDL) document via match XML elements within text elements. 这两个元素属于命名http://microsoft.com/wsdl/mime/textMatching/空间。Both elements belong to the namespace http://microsoft.com/wsdl/mime/textMatching/.

如果match在 WSDL 文档中指定了元素, 则 wsdl.exe 工具会将特性MatchAttribute应用于生成的客户端代理类中的相应 Web 方法。When match elements are specified in a WSDL document, the Wsdl.exe tool applies MatchAttribute attributes to the corresponding Web methods in the client proxy class that is generated. 特性的属性PatternMatcher为实例建立搜索条件。 MatchAttributeA MatchAttribute attribute's properties establish the search criteria for a PatternMatcher instance.

开发人员通常不需要直接使用PatternMatcherA developer typically does not need to directly use PatternMatcher.

构造函数

PatternMatcher(Type)

根据输入类型创建 PatternMatcher 实例。Creates a PatternMatcher instance based on the input type.

方法

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
Match(String)

搜索文本输入以便反序列化表示 Web 方法返回值的对象。Searches a text input to deserialize an object representing a Web method return value.

MemberwiseClone()

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

(继承自 Object)
ToString()

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

(继承自 Object)

适用于

另请参阅