SALES: 1-800-867-1380

TransportClientEndpointBehavior Class

 

Describes the WCF endpoint behavior that is used to specify the Service Bus credentials for a particular endpoint.

Namespace:   Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

System.Object
  Microsoft.ServiceBus.TransportClientEndpointBehavior

public sealed class TransportClientEndpointBehavior : IEndpointBehavior

NameDescription
System_CAPS_pubmethodTransportClientEndpointBehavior()

Initializes a new instance of the TransportClientEndpointBehavior class.

System_CAPS_pubmethodTransportClientEndpointBehavior(TokenProvider)

Initializes a new instance of the TransportClientEndpointBehavior class.

NameDescription
System_CAPS_pubpropertyTokenProvider

Gets or sets the token provider that is used as a binding parameter.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEndpointBehavior.AddBindingParameters(ServiceEndpoint, BindingParameterCollection)

Passes the specified data at runtime to the specified binding to support Service Bus credential behavior.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

Implements a modification or extension of the client across an endpoint.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher)

Implements a modification or extension of the service across an endpoint.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEndpointBehavior.Validate(ServiceEndpoint)

Confirms that the endpoint is a valid Windows Azure Service Bus endpoint that can be modified by the behavior of this instance.

Service Bus supports only Full Trust code access security.

Instances of this behavior are shareable across endpoints so that the descriptions of multiple endpoints (listener and channels) using the same Service Bus credentials can be populated with the same configured instance of this class.

The behavior can be defined and applied to endpoints in code and in configuration files. For more information, see .

The following code example defines a behavior for a service endpoint that specifies shared secret credentials and adds this behavior to the service host before opening it.

Uri address = ServiceBusEnvironment.CreateServiceUri("sb", serviceNamespaceDomain, "SharedSecretAuthenticationService");

TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior();
TokenProvider tokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerSecret);

sharedSecretServiceBusCredential.TokenProvider = tokenProvider;

ServiceHost host = new ServiceHost(typeof(EchoService), address);
host.Description.Endpoints[0].Behaviors.Add(behavior);
host.Open();

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft