SoapExtensionImporter 类


为类提供通用接口和功能,以生成用于指定 SOAP 扩展的代码特性。Provides a common interface and functionality for classes to generate code attributes that specify SOAP extensions.

public ref class SoapExtensionImporter abstract
public abstract class SoapExtensionImporter
type SoapExtensionImporter = class
Public MustInherit Class SoapExtensionImporter


SoapExtensionImporter abstract 类公开了一个 abstract 方法, ImportMethod 该方法允许派生类向表示绑定中的操作的任何方法添加元数据。The SoapExtensionImporterabstract class exposes an abstract method, ImportMethod, which allows a derived class to add metadata to any method that represents an operation in a binding. 方法本身不是输入方法。The method itself is not an input method. 代码特性(添加到绑定类中的所有 Web 方法)表示 SOAP Web 服务协议的扩展,例如,将额外的标头添加到传出 SOAP 消息或对传入的 SOAP 消息进行额外处理。The code attributes, which are added to all Web methods in a binding class, represent extensions to the SOAP Web services protocol, for example, for adding extra headers to an outgoing SOAP message or doing extra processing on an incoming SOAP message.

您可以使用从派生的类 SoapExtensionImporter 来扩展客户端代理代码或 abstract 服务器代码的生成。You can use a class derived from SoapExtensionImporter to extend the generation of client proxy code or abstract server code. 你可以将此类派生类与从类派生的类结合使用,该类可 abstract SoapExtension 扩展客户端或服务上的 SOAP 消息的运行时处理。You can use such a derived class in conjunction with a class derived from the abstractSoapExtension class, which extends run-time processing of SOAP messages on the client or service.

可以 SoapExtensionImporter 通过 soapExtensionImporterTypes 配置元素及其子元素在配置文件中指定 addYou can specify SoapExtensionImporter in a configuration file through the soapExtensionImporterTypes configuration element and its child add element. 可以将配置应用于:You can apply the configuration to:

  • ASP.NET Web 应用程序:服务或客户端。An ASP.NET Web application: service or client.

  • 独立 .NET Framework 应用程序:仅限客户端。A stand-alone .NET Framework application: client only.



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



获取或设置调用 SoapProtocolImporter 方法的 ImportMethod(CodeAttributeDeclarationCollection) 实例。Gets or sets the SoapProtocolImporter instance that invokes the ImportMethod(CodeAttributeDeclarationCollection) method.



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

(继承自 Object)

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

(继承自 Object)

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

(继承自 Object)

在派生类中重写时,向表示绑定中的操作的任何方法添加代码特性声明。When overridden in a derived class, adds code attribute declarations to any method that represents an operation in a binding.


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

(继承自 Object)

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

(继承自 Object)