ServiceEndpointCollection Class

A collection that contains the endpoints for a service.

Namespace:  System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public class ServiceEndpointCollection : Collection<ServiceEndpoint>

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.Object
  System.Collections.ObjectModel.Collection<ServiceEndpoint>
    System.ServiceModel.Description.ServiceEndpointCollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft