ServiceEndpoint Class

 

Represents the endpoint for a service that allows clients of the service to find and communicate with the service.

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


Public Class ServiceEndpoint

NameDescription
System_CAPS_pubmethodServiceEndpoint(ContractDescription)

Initializes a new instance of the ServiceEndpoint class for a specified contract.

System_CAPS_pubmethodServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initializes a new instance of the ServiceEndpoint class with a specified contract, binding, and address.

NameDescription
System_CAPS_pubpropertyAddress

Gets or sets the endpoint address for the service endpoint.

System_CAPS_pubpropertyBehaviors

Gets the behaviors for the service endpoint.

System_CAPS_pubpropertyBinding

Gets or sets the binding for the service endpoint.

System_CAPS_pubpropertyContract

Gets the contract for the service endpoint.

System_CAPS_pubpropertyEndpointBehaviors

Gets the endpoint behaviors for the service.

System_CAPS_pubpropertyIsSystemEndpoint

Gets or sets whether the service endpoint is generated by the system as opposed to being user-defined.

System_CAPS_pubpropertyListenUri

Gets or sets the URI at which the service endpoint listens.

System_CAPS_pubpropertyListenUriMode

Gets or sets how the transport handles the URI that is provided for the service to listen on.

System_CAPS_pubpropertyName

Gets or sets the name of the service endpoint.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The service endpoint contains the information about the address, binding, contract, and behavior required by a client to find and interact with the service at this endpoint.

Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

Dim cd As New ContractDescription("Calculator")
Dim svcEndpoint As New ServiceEndpoint(cd)

Dim endpnt As ServiceEndpoint = serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

Console.WriteLine("Address: {0}", endpnt.Address)

' Enable Mex
Dim smb As New ServiceMetadataBehavior()
smb.HttpGetEnabled = True
serviceHost.Description.Behaviors.Add(smb)

serviceHost.Open()

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0

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

Return to top
Show: