ServiceDescription.Endpoints Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Hizmet açıklamasından uç nokta koleksiyonunu alır.
public:
property System::ServiceModel::Description::ServiceEndpointCollection ^ Endpoints { System::ServiceModel::Description::ServiceEndpointCollection ^ get(); };
public System.ServiceModel.Description.ServiceEndpointCollection Endpoints { get; }
member this.Endpoints : System.ServiceModel.Description.ServiceEndpointCollection
Public ReadOnly Property Endpoints As ServiceEndpointCollection
Özellik Değeri
ServiceEndpointCollection Hizmet için tanımlanan uç noktaları içeren.
Örnekler
// Iterate through the endpoints contained in the ServiceDescription
ServiceEndpointCollection sec = svcDesc.Endpoints;
foreach (ServiceEndpoint se in sec)
{
Console.WriteLine("Endpoint:");
Console.WriteLine("\tAddress: {0}", se.Address.ToString());
Console.WriteLine("\tBinding: {0}", se.Binding.ToString());
Console.WriteLine("\tContract: {0}", se.Contract.ToString());
KeyedByTypeCollection<IEndpointBehavior> behaviors = se.Behaviors;
foreach (IEndpointBehavior behavior in behaviors)
{
Console.WriteLine("Behavior: {0}", behavior.ToString());
}
}
' Iterate through the endpoints contained in the ServiceDescription
Dim sec As ServiceEndpointCollection = svcDesc.Endpoints
For Each se As ServiceEndpoint In sec
Console.WriteLine("Endpoint:")
Console.WriteLine(Constants.vbTab & "Address: {0}", se.Address.ToString())
Console.WriteLine(Constants.vbTab & "Binding: {0}", se.Binding.ToString())
Console.WriteLine(Constants.vbTab & "Contract: {0}", se.Contract.ToString())
Dim behaviors As KeyedByTypeCollection(Of IEndpointBehavior) = se.Behaviors
For Each behavior As IEndpointBehavior In behaviors
Console.WriteLine("Behavior: {0}", CType(behavior, Object).ToString())
Next behavior
Next se
Açıklamalar
Bu yöntem tarafından döndürülen uç noktaların ServiceEndpointCollection her birinde hizmetle iletişim kurmak için gereken adres, bağlama, sözleşme ve davranış bilgileri bulunur. Bu bilgilere erişmek için ilgili arama ölçütlerini ServiceEndpoint kullanan yöntemiyle Find koleksiyonundan öğesini almanız gerekir. ServiceEndpoint Ardından özellikler bilgilere erişmek için kullanılabilir. Örneğin, ContractDescription özelliği tarafından Contract erişilir.
parametresi olarak geçirerek ServiceEndpoint bir hizmet uç noktası hakkındaki meta verileri dışarı aktarın ExportEndpoint(ServiceEndpoint).