Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DiscoveryClientBindingElement Class

.NET Framework 4.6 and 4.5

A binding element that can be added to a WCF client application to take advantage of the Discovery client channel. The Discovery client channel allows a WCF client application to access a discoverable service without knowing the endpoint address in advance.


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

public sealed class DiscoveryClientBindingElement : BindingElement

The DiscoveryClientBindingElement type exposes the following members.

Public methodDiscoveryClientBindingElement()Initializes a new instance of the DiscoveryClientBindingElement class with default values.
Public methodDiscoveryClientBindingElement(DiscoveryEndpointProvider, FindCriteria)Initializes a new instance of the DiscoveryClientBindingElement class with the specified endpoint provider and service finding criteria.

Public propertyDiscoveryEndpointProviderGets the discovery endpoint provider.
Public propertyFindCriteriaGets or sets the find criteria.

Public methodBuildChannelFactory<TChannel>Initializes a channel factory for producing channels of a specific type from the binding context. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public methodBuildChannelListener<TChannel>Building a channel listener is not supported by the Discovery client channel. This method can be overridden to initialize a channel listener to accept channels of a specified type from the binding context. (Overrides BindingElement.BuildChannelListener<TChannel>(BindingContext).)
Public methodCanBuildChannelFactory<TChannel>Returns a value that indicates whether the current binding can build a channel factory stack on the client. (Overrides BindingElement.CanBuildChannelFactory<TChannel>(BindingContext).)
Public methodCanBuildChannelListener<TChannel>Because building a channel listener is not supported by the Discovery client channel, this method always returns false. It may be extended to return a value that indicates whether the binding element can build a listener for a specific type of channel. (Overrides BindingElement.CanBuildChannelListener<TChannel>(BindingContext).)
Public methodCloneCreates a copy of the binding element. (Overrides BindingElement.Clone().)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetProperty<T>Returns an object of the requested type, if present in the binding stack. (Overrides BindingElement.GetProperty<T>(BindingContext).)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public fieldStatic memberDiscoveryEndpointAddressA static temporary address that acts as a placeholder until the actual service address is resolved.

The Discovery client channel is used by creating a custom binding element and adding a DiscoveryClientBindingElement to the top of the binding stack. For more information about the Discovery client channel, see Using the Discovery Client Channel.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

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