ServiceDescription Constructor (IEnumerable(Of ServiceEndpoint))

 

Initializes a new instance of the ServiceDescription class from a specified enumeration of service endpoints.

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

Public Sub New (
	endpoints As IEnumerable(Of ServiceEndpoint)
)

Parameters

endpoints
Type: System.Collections.Generic.IEnumerable(Of ServiceEndpoint)

The IEnumerable(Of T) of type ServiceEndpoint used to initialize the service description.

Exception Condition
ArgumentNullException

endpoints is null.

' Create ServiceDescription from a collection of service endpoints
Dim endpoints As New List(Of ServiceEndpoint)()
Dim conDescr As New ContractDescription("ICalculator")
Dim endpointAddress As New EndpointAddress("http://localhost:8001/Basic")
Dim ep As New ServiceEndpoint(conDescr, New BasicHttpBinding(), endpointAddress)
endpoints.Add(ep)
Dim sd2 As New ServiceDescription(endpoints)

.NET Framework
Available since 3.0
Return to top
Show: