Aracılığıyla paylaş


Port Sınıf

Tanım

XML Web hizmetinde bulunan tek bir uç noktayı tanımlar. Bu sınıf devralınamaz.

public ref class Port sealed : System::Web::Services::Description::DocumentableItem
public ref class Port sealed : System::Web::Services::Description::NamedItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Port : System.Web.Services.Description.DocumentableItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Port : System.Web.Services.Description.NamedItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Port = class
    inherit DocumentableItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Port = class
    inherit NamedItem
Public NotInheritable Class Port
Inherits DocumentableItem
Public NotInheritable Class Port
Inherits NamedItem
Devralma
Devralma
Öznitelikler

Örnekler

Aşağıdaki örneklerde bir Port oluşturulur ve adlı myDescriptionmevcut ServiceDescription bir koleksiyona Ports eklenir.

// Create a Port.
Port^ postPort = gcnew Port;
postPort->Name = "PortServiceHttpPost";
postPort->Binding = gcnew XmlQualifiedName( "s0:PortServiceHttpPost" );

// Create an HttpAddressBinding.
HttpAddressBinding^ postAddressBinding = gcnew HttpAddressBinding;
postAddressBinding->Location = "http://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort->Extensions->Add( postAddressBinding );

// Get the Service of the postPort.
Service^ myService = postPort->Service;

// Print the service name for the port.
Console::WriteLine( "This is the service name of the postPort:*{0}*", myDescription->Services[ 0 ]->Ports[ 0 ]->Service->Name );

// Add the Port to the PortCollection of the ServiceDescription.
myDescription->Services[ 0 ]->Ports->Add( postPort );
// Create a Port.
Port postPort = new Port();
postPort.Name = "PortServiceHttpPost";
postPort.Binding = new XmlQualifiedName("s0:PortServiceHttpPost");

// Create an HttpAddressBinding.
HttpAddressBinding postAddressBinding = new HttpAddressBinding();
postAddressBinding.Location =
   "http://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort.Extensions.Add(postAddressBinding);

// Get the Service of the postPort.
Service myService = postPort.Service;

// Print the service name for the port.
Console.WriteLine("This is the service name of the postPort:*" +
   myDescription.Services[0].Ports[0].Service.Name + "*");

// Add the Port to the PortCollection of the ServiceDescription.
myDescription.Services[0].Ports.Add(postPort);

' Create a Port.
Dim postPort As New Port()
postPort.Name = "PortServiceHttpPost"
postPort.Binding = New XmlQualifiedName("s0:PortServiceHttpPost")


' Create an HttpAddressBinding.
Dim postAddressBinding As New HttpAddressBinding()
postAddressBinding.Location = _
   "http://localhost/PortClass/PortService.vb.asmx"

' Add the HttpAddressBinding to the Port.
postPort.Extensions.Add(postAddressBinding)

' Get the Service of the postPort.
Dim myService As Service = postPort.Service

' Print the service name for the port.
Console.WriteLine("This is the service name of the postPort:*" & _
   myDescription.Services(0).Ports(0).Service.Name & "*")

' Add the Port to the PortCollection of the ServiceDescription.
myDescription.Services(0).Ports.Add(postPort)

Açıklamalar

Bu sınıf, belirli PortTypebir için işlemler ve iletiler için Bindingileti biçimi ve protokol ayrıntılarını tanımlayan bir için tek bir adres (URI) belirtir. özelliği belirtilen BindingPortbir için bu değerleri alır veya ayarlar.

Bu sınıf, öğesiyle <service> birlikte gelen Web Hizmetleri Açıklama Dili (WSDL) <port> öğesine karşılık gelir. WSDL hakkında daha fazla bilgi için bkz. WSDL belirtimi.

Oluşturucular

Name Description
Port()

Port sınıfının yeni bir örneğini başlatır.

Özellikler

Name Description
Binding

öğesinin XML <binding> özniteliğinin Portdeğerini alır veya ayarlar.

Documentation

örneğinin DocumentableItemmetin belgelerini alır veya ayarlar.

(Devralındığı yer: DocumentableItem)
DocumentationElement

için DocumentableItembelge öğesini alır veya ayarlar.

(Devralındığı yer: DocumentableItem)
ExtensibleAttributes

Web Hizmetleri Birlikte Çalışabilirliği (WS-I) Temel Profil 1.1 ile uyumlu olması için WSDL'nin öznitelik uzantılarını temsil eden bir tür XmlAttribute dizisi alır veya ayarlar.

(Devralındığı yer: DocumentableItem)
Extensions

ile ilişkili genişletilebilirlik öğelerinin Portkoleksiyonunu alır.

Name

öğesinin adını Portalır veya ayarlar.

Name

Öğenin adını alır veya ayarlar.

(Devralındığı yer: NamedItem)
Namespaces

Bir ServiceDescription nesne oluşturulduğunda ad alanı ön eklerini ve ad alanlarını korumak için kullanılan ad alanı ön eklerinin ve ad alanlarının sözlüğünü alır veya ayarlar.

(Devralındığı yer: DocumentableItem)
Service

öğesinin ServicePort üyesi olduğu öğesini alır.

Yöntemler

Name Description
Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Geçerli örneğin Type alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectbasit bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden bir dize döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır

Ayrıca bkz.