EndpointCollectionElement.TryAdd Method (String, ServiceEndpoint, Configuration)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

When implemented in a derived class, adds the specified endpoint to the collection of service endpoints in a configuration file.

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

protected internal abstract bool TryAdd(
	string name,
	ServiceEndpoint endpoint,
	Configuration config


Type: System.String

The name of the service endpoint that contains the endpoint collection.

Type: System.ServiceModel.Description.ServiceEndpoint

The service endpoint element to be added to the collection.

Type: System.Configuration.Configuration

The configuration file that receives the service endpoint.

Return Value

Type: System.Boolean

true if the endpoint is added to the collection in the configuration file; otherwise, false.

.NET Framework
Available since 4.0
Return to top