Binding 类

定义

指定在 XML Web services 中使用的具体数据格式和协议。Specifies the concrete data format and protocols used in the XML Web service. 此类不能被继承。This class cannot be inherited.

public ref class Binding sealed : System::Web::Services::Description::DocumentableItem
public ref class Binding sealed : System::Web::Services::Description::NamedItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Binding : System.Web.Services.Description.DocumentableItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Binding : System.Web.Services.Description.NamedItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Binding = class
    inherit DocumentableItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Binding = class
    inherit NamedItem
Public NotInheritable Class Binding
Inherits DocumentableItem
Public NotInheritable Class Binding
Inherits NamedItem
继承
继承
属性

示例

下面的示例演示类的典型用法 BindingThe following example demonstrates a typical use of the Binding class.

// Get Binding Name = S"MathServiceSoap".
myBinding = myServiceDescription->Bindings[ "MathServiceHttpGet" ];
if ( myBinding != nullptr )
{
   Console::WriteLine( "\n\nName : {0}", myBinding->Name );
   Console::WriteLine( "Type : {0}", myBinding->Type );
}
// Get Binding Name = "MathServiceSoap".
myBinding = myServiceDescription.Bindings["MathServiceHttpGet"];
if (myBinding != null)
{
   Console.WriteLine("\n\nName : " + myBinding.Name);
   Console.WriteLine("Type : " + myBinding.Type);
}
' Get Binding Name = "MathServiceSoap".
myBinding = myServiceDescription.Bindings("MathServiceHttpGet")
If Not (myBinding Is Nothing) Then
   Console.WriteLine((ControlChars.Cr + ControlChars.Cr + "Name : " + myBinding.Name))
   Console.WriteLine(("Type : " + myBinding.Type.ToString()))
End If

注解

Binding类对应于 Web 服务描述语言 (<binding> 由根元素括起来的 WSDL) 元素 <definitions>The Binding class corresponds to the Web Services Description Language (WSDL) <binding> element enclosed by the root <definitions> element. 有关 WSDL 的更多信息,请参阅 WSDL 规范。For more information about WSDL, see the WSDL specification.

构造函数

Binding()

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

属性

Documentation

获取或设置 DocumentableItem 的实例的文本文档。Gets or sets the text documentation for the instance of the DocumentableItem.

(继承自 DocumentableItem)
DocumentationElement

获取或设置 DocumentableItem 的文档元素。Gets or sets the documentation element for the DocumentableItem.

(继承自 DocumentableItem)
ExtensibleAttributes

获取或设置类型为 XmlAttribute 的数组,该数组表示为符合 Web 服务互操作性 (WS-I) 基本概要 1.1 而进行的 WSDL 特性扩展。Gets or sets an array of type XmlAttribute that represents attribute extensions of WSDL to comply with Web Services Interoperability (WS-I) Basic Profile 1.1.

(继承自 DocumentableItem)
Extensions

获取在 XML Web services 中使用的扩展性元素集合。Gets the collection of extensibility elements used in the XML Web service.

Name

获取或设置包含 Binding 的名称的字符串值。Gets or sets a string value containing the name of the Binding.

Name

获取或设置项的名称。Gets or sets the name of the item.

(继承自 NamedItem)
Namespaces

获取或设置命名空间前缀和命名空间的字典,该字典用于在构造 ServiceDescription 对象时,保留命名空间的前缀和命名空间。Gets or sets the dictionary of namespace prefixes and namespaces used to preserve namespace prefixes and namespaces when a ServiceDescription object is constructed.

(继承自 DocumentableItem)
Operations

获取在 XML Web services 所支持的操作中使用的数据格式和消息协议的规范的集合。Gets the collection of specifications for data formats and message protocols used in the action supported by the XML Web service.

ServiceDescription

获取 ServiceDescription 为其成员的 BindingGets the ServiceDescription of which the Binding is a member.

Type

获取或设置一个值,该值表示 Binding 与之关联的 PortType 的命名空间限定名。Gets or sets a value representing the namespace-qualified name of the PortType with which the Binding is associated.

方法

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)
MemberwiseClone()

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

(继承自 Object)
ToString()

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

(继承自 Object)

适用于