ServiceEndpoint Class
.NET Framework 4.5
Represents the endpoint for a service that allows clients of the service to find and communicate with the service.
System.Object
System.ServiceModel.Description.ServiceEndpoint
System.ServiceModel.Activities.WorkflowControlEndpoint
System.ServiceModel.Activities.WorkflowHostingEndpoint
System.ServiceModel.Description.ServiceMetadataEndpoint
System.ServiceModel.Description.WebServiceEndpoint
System.ServiceModel.Discovery.AnnouncementEndpoint
System.ServiceModel.Discovery.DiscoveryEndpoint
System.ServiceModel.Discovery.DynamicEndpoint
System.ServiceModel.Description.ServiceEndpoint
System.ServiceModel.Activities.WorkflowControlEndpoint
System.ServiceModel.Activities.WorkflowHostingEndpoint
System.ServiceModel.Description.ServiceMetadataEndpoint
System.ServiceModel.Description.WebServiceEndpoint
System.ServiceModel.Discovery.AnnouncementEndpoint
System.ServiceModel.Discovery.DiscoveryEndpoint
System.ServiceModel.Discovery.DynamicEndpoint
Namespace: System.ServiceModel.Description
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The ServiceEndpoint type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | ServiceEndpoint(ContractDescription) | Initializes a new instance of the ServiceEndpoint class for a specified contract. |
![]() ![]() ![]() | ServiceEndpoint(ContractDescription, Binding, EndpointAddress) | Initializes a new instance of the ServiceEndpoint class with a specified contract, binding, and address. |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | Address | Gets or sets the endpoint address for the service endpoint. |
![]() | Behaviors | Gets the behaviors for the service endpoint. |
![]() ![]() ![]() | Binding | Gets or sets the binding for the service endpoint. |
![]() ![]() ![]() | Contract | Gets the contract for the service endpoint. |
![]() ![]() | EndpointBehaviors | Gets the endpoint behaviors for the service. |
![]() | IsSystemEndpoint | Gets or sets whether the service endpoint is generated by the system as opposed to being user-defined. |
![]() | ListenUri | Gets or sets the URI at which the service endpoint listens. |
![]() | ListenUriMode | Gets or sets how the transport handles the URI that is provided for the service to listen on. |
![]() ![]() ![]() | Name | Gets or sets the name of the service endpoint. |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Uri baseAddress = new Uri("http://localhost:8001/Simple"); ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress); ContractDescription cd = new ContractDescription("Calculator"); ServiceEndpoint svcEndpoint = new ServiceEndpoint(cd); ServiceEndpoint endpnt = serviceHost.AddServiceEndpoint( typeof(ICalculator), new WSHttpBinding(), "CalculatorServiceObject"); Console.WriteLine("Address: {0}", endpnt.Address); // Enable Mex ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; serviceHost.Description.Behaviors.Add(smb); serviceHost.Open();
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


