ServiceEndpointCollection Class
Assembly: System.ServiceModel (in system.servicemodel.dll)
'Declaration Public Class ServiceEndpointCollection Inherits Collection(Of ServiceEndpoint) 'Usage Dim instance As ServiceEndpointCollection
public class ServiceEndpointCollection extends Collection<ServiceEndpoint>
public class ServiceEndpointCollection extends Collection<ServiceEndpoint>
Not applicable.
This collection of endpoints for a service is used by the metadata API to manage services with multiple endpoints. ServiceEndpointCollection is returned, for example, by the Endpoints property and by the ImportAllEndpoints method when creating service endpoints from WSDL port types.
The collection provides the functionality to Find the endpoints of a particular type, that have a specific name or address, or to FindAll of the endpoints for a service that meet a specified contract type or name criteria.
The following example illustrates the use of the Find and FindAll methods to enumerate ServiceEndpoint objects that satisfy various search criteria.
[System.ServiceModel.ServiceContractAttribute(
Namespace = "http://Microsoft.ServiceModel.Samples")]
public interface IAdd
{
[System.ServiceModel.OperationContractAttribute(
Action = "http://Microsoft.ServiceModel.Samples/IAdd/Add",
ReplyAction = "http://Microsoft.ServiceModel.Samples/IAdd/AddResponse")]
double Add(double n1, double n2);
}
public interface IAddChannel : IAdd, System.ServiceModel.IClientChannel
{
}
public partial class AddClient : System.ServiceModel.ClientBase<IAdd>, IAdd
{
public AddClient()
{
}
public AddClient(string endpointConfigurationName)
:
base(endpointConfigurationName)
{
}
public AddClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress address)
:
base(binding, address)
{
}
public double Add(double n1, double n2)
{
return base.Channel.Add(n1, n2);
}
}
System.Collections.ObjectModel.Collection
System.ServiceModel.Description.ServiceEndpointCollection
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.