TcpTransportBindingElement::GetProperty<T> Method (BindingContext^)

 

Gets a specified object from the BindingContext.

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

public:
generic<typename T>
where T : ref class
virtual T GetProperty(
	BindingContext^ context
) override

Return Value

Type: T

The specified object from the BindingContext, or null if the object is not found.

Type Parameters

T

The object to get.

This method gets the specified object from the base class, or from one of that class's ancestors. The object returned is usually a collection of properties, for example, an object that implements ISecurityCapabilities.

The following example shows how to get a specified object from the BindingContext.

BasicHttpBinding binding = new BasicHttpBinding();
ISecurityCapabilities b =
    binding.GetProperty<ISecurityCapabilities>
    (new BindingParameterCollection());

bool SupportsServerAuthentication =
    b.SupportsServerAuthentication;

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Return to top
Show: