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. PatternMatcher 类由客户端 TextReturnReader 类调用,后者反序列化 Web 服务返回值。The 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. 正则表达式搜索目标在 Web 服务描述语言(WSDL)文档中通过 match text 元素中的 XML 元素来指定。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/.

如果在 WSDL 文档中指定 match 元素,则 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. MatchAttribute 属性的属性为 PatternMatcher 实例建立搜索条件。A 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()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅