ProtocolImporter 类

定义

提供各种通信协议通用的功能,以用于为 Web 服务生成类。Provides common functionality across communication protocols for generating classes for Web services.

public ref class ProtocolImporter abstract
public abstract class ProtocolImporter
type ProtocolImporter = class
Public MustInherit Class ProtocolImporter
继承
ProtocolImporter
派生

注解

抽象 ProtocolImporter 类及其具体派生类根据指定的通信协议生成客户端代理代码或抽象服务器代码。The abstract ProtocolImporter class and its concrete derived classes generate client proxy code or abstract server code according to a specified communication protocol. ProtocolImporter 提供通用功能,而不考虑协议。ProtocolImporter provides common functionality regardless of the protocol. 在给定的协议中,具体派生类为 (WSDL) 文档中的 Web 服务描述语言定义的每个受支持绑定生成类。Within a given protocol, a concrete derived class generates a class for each supported binding defined in a Web Services Description Language (WSDL) document. 通常,开发人员无需直接调用派生自的类,而是 ProtocolImporter 通过类间接使用这些类 ServiceDescriptionImporterTypically, instead of directly invoking classes derived from ProtocolImporter, a developer uses these classes indirectly through the ServiceDescriptionImporter class.

构造函数

ProtocolImporter()

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

属性

AbstractSchemas

获取关联的 ServiceDescriptionImporter 实例所使用的抽象 XML 架构。Gets the abstract XML schemas used by the associated ServiceDescriptionImporter instance.

Binding

获取协议导入程序当前正在处理以生成类的 Web 服务描述语言 (WSDL) 绑定。Gets the Web Services Description Language (WSDL) binding that the protocol importer is currently processing to generate a class.

ClassName

获取当前正在生成的绑定类的名称。Gets the name of the binding class that is currently being generated.

ClassNames

获取可为当前正在生成的绑定类生成唯一名称的 CodeIdentifiers 对象。Gets the CodeIdentifiers object that generates a unique name for the binding class that is currently being generated.

CodeNamespace

获取正在生成的绑定类的 .NET Framework 命名空间的表示形式。Gets a representation of the .NET Framework namespace of the binding classes that are being generated.

CodeTypeDeclaration

获取当前正在生成的绑定类的表示形式。Gets a representation of the binding class that is currently being generated.

ConcreteSchemas

获取关联的 ServiceDescriptionImporter 实例所使用的具体 XML 架构。Gets the concrete XML schemas used by the associated ServiceDescriptionImporter instance.

InputMessage

获取协议导入程序当前正在处理,以在绑定类中生成方法的抽象操作的 Web 服务描述语言 (WSDL) 输入消息。Gets the Web Services Description Language (WSDL) input message for the abstract operation that the protocol importer is currently processing to generate a method in a binding class.

MethodName

获取协议导入程序当前正在生成的绑定类方法的名称。Gets the name of the binding class method which that the protocol importer is currently generating.

Operation

获取协议导入程序当前正在处理,以在绑定类中生成方法的抽象 Web 服务描述语言 (WSDL) 操作。Gets the abstract Web Services Description Language (WSDL) operation that the protocol importer is currently processing to generate a method in a binding class.

OperationBinding

获取协议导入程序当前正在处理,以在绑定类中生成方法的 Web 服务描述语言 (WSDL) 操作绑定。Gets the Web Services Description Language (WSDL) operation binding that the protocol importer is currently processing to generate a method in a binding class.

OutputMessage

获取协议导入程序当前正在处理,以在绑定类中生成方法的抽象操作的 Web 服务描述语言 (WSDL) 输出消息。Gets the Web Services Description Language (WSDL) output message for the abstract operation that the protocol importer is currently processing to generate a method in a binding class.

Port

获取一个 Web 服务描述语言 (WSDL) 端口,其中包含对协议导入程序当前正在处理以生成绑定类的绑定的引用。Gets a Web Services Description Language (WSDL) port that contains a reference to the binding that the protocol importer is currently processing to generate a binding class. 如果有多个端口引用当前绑定,则当前端口为最后一次找到的绑定所在的端口。If more than one port refers to the current binding, the current port is the one in which the binding has most recently been found.

PortType

获取由协议导入程序当前正在处理,以生成绑定类的绑定所实现的 Web 服务描述语言 (WSDL) PortTypeGets the Web Services Description Language (WSDL) PortType that is implemented by the binding that the protocol importer is currently processing to generate a binding class.

ProtocolName

具体派生类要获取正在使用的协议的名称必须实现的抽象属性。Abstract property that concrete derived classes must implement to get the name of the protocol being used.

Schemas

获取关联的 ServiceDescriptionImporter 实例使用的所有 XML 架构(包括抽象架构和具体架构)。Gets all the XML schemas, both abstract and concrete, used by the associated ServiceDescriptionImporter instance.

Service

获取包含对绑定(协议导入程序当前正在处理以生成绑定类的绑定)的引用的 Web 服务描述语言 (WSDL) 服务。Gets the Web Services Description Language (WSDL) service that contains a reference to the binding that the protocol importer is currently processing to generate a binding class.

ServiceDescriptions

获取属于关联的 ServiceDescriptionCollection 实例,要从其中搜索用于生成绑定类的绑定的 ServiceDescriptionImporter 对象。Gets the ServiceDescriptionCollection objects that belong to the associated ServiceDescriptionImporter instance that are searched for bindings from which to generate binding classes.

Style

获取一个枚举值,该值指示正在生成的是客户端代理类还是抽象服务器类。Gets an enumeration value that indicates whether a client proxy class or an abstract server class is being generated. 枚举值为“客户端”和“服务器”。The values are Client and Server. 该值是关联的 ServiceDescriptionImporter 实例的 Style 属性的值。The value is that of the associated ServiceDescriptionImporter instance's Style property.

Warnings

获取或设置 ServiceDescriptionImportWarnings 枚举值,该值指示协议导入程序在生成绑定类时发出的警告(如果有)的类型。Gets or sets a ServiceDescriptionImportWarnings enumeration value that indicates the types of warnings, if any, issued by the protocol importer while generating binding classes.

方法

AddExtensionWarningComments(CodeCommentStatementCollection, ServiceDescriptionFormatExtensionCollection)

对于输入扩展集合中的每个未处理的扩展或 XML 元素,打开 RequiredExtensionsIgnoredOptionalExtensionsIgnored 警告。For each unhandled extension or XML element in the input extensions collection, turns on a RequiredExtensionsIgnored or OptionalExtensionsIgnored warning for each unhandled extension or XML element in the input extensions collection.

BeginClass()

当在派生类中重写时,初始化绑定类的生成。When overridden in a derived class, initializes the generation of a binding class.

BeginNamespace()

在派生类中重写时,在代码生成过程中执行命名空间范围内的初始化。When overridden in a derived class, performs namespace-wide initialization during code generation.

EndClass()

在派生类中重写时,处理绑定类。When overridden in a derived class, processes a binding class.

EndNamespace()

在派生类中重写时,对整个命名空间执行处理。When overridden in a derived class, performs processing for an entire namespace.

Equals(Object)

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

(继承自 Object)
GenerateMethod()

在派生类中重写时,为绑定类生成方法代码。When overridden in a derived class, generates method code for binding classes.

GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
IsBindingSupported()

在派生类中重写时,确定是否可为当前绑定生成类。When overridden in a derived class, determines whether a class can be generated for the current binding.

IsOperationFlowSupported(OperationFlow)

在派生类中重写时,确定当前操作的操作流是否受支持。When overridden in a derived class, determines whether the current operation's operation flow is supported.

MemberwiseClone()

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

(继承自 Object)
OperationBindingSyntaxException(String)

生成“异常”,指示正为其生成绑定类的当前 OperationBinding 实例在目标命名空间内无效。Produces an Exception indicating that the current OperationBinding instance for which a binding class is being generated is invalid within the target namespace.

OperationSyntaxException(String)

生成“异常”,指示正为其生成绑定类的当前 Operation 实例在目标命名空间内无效。Produces an Exception indicating that the current Operation instance for which a binding class is being generated is invalid within the target namespace.

ToString()

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

(继承自 Object)
UnsupportedBindingWarning(String)

打开通过 UnsupportedBindingsIgnored 属性获得的 ServiceDescriptionImportWarnings 枚举中的 Warnings 警告。Turns on an UnsupportedBindingsIgnored warning in the ServiceDescriptionImportWarnings enumeration obtained through the Warnings property. 此方法也将警告消息添加到正生成的类的注释中。This method also adds a warning message to the comments for the class that is being generated.

UnsupportedOperationBindingWarning(String)

打开通过 UnsupportedOperationsIgnored 属性获得的 ServiceDescriptionImportWarnings 枚举中的 Warnings 警告。Turns on an UnsupportedOperationsIgnored warning in the ServiceDescriptionImportWarnings enumeration obtained through the Warnings property. 此方法也将警告消息添加到正生成的类的注释中。This method also adds a warning message to the comments for the class that is being generated.

UnsupportedOperationWarning(String)

打开通过 UnsupportedOperationsIgnored 属性获得的 ServiceDescriptionImportWarnings 枚举中的 Warnings 警告。Turns on an UnsupportedOperationsIgnored warning in the ServiceDescriptionImportWarnings enumeration obtained through the Warnings property. 此方法也将警告消息添加到正生成的类的注释中。This method also adds a warning message to the comments for the class that is being generated.

适用于