TcpTransportBindingElement.GetProperty<T>(BindingContext) メソッド

定義

BindingContextから指定したオブジェクトを取得します。

public:
generic <typename T>
 where T : class override T GetProperty(System::ServiceModel::Channels::BindingContext ^ context);
public override T GetProperty<T>(System.ServiceModel.Channels.BindingContext context) where T : class;
override this.GetProperty : System.ServiceModel.Channels.BindingContext -> 'T (requires 'T : null)
Public Overrides Function GetProperty(Of T As Class) (context As BindingContext) As T

型パラメーター

T

取得するオブジェクト。

パラメーター

context
BindingContext

BindingContext です。

返品

T

BindingContextから指定されたオブジェクト。オブジェクトが見つからない場合はnull

次の例は、 BindingContextから指定したオブジェクトを取得する方法を示しています。

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

bool SupportsServerAuthentication =
    b.SupportsServerAuthentication;

注釈

このメソッドは、指定したオブジェクトを基底クラスから取得するか、そのクラスのいずれかの先祖から取得します。 通常、返されるオブジェクトはプロパティのコレクションです。たとえば、 ISecurityCapabilitiesを実装するオブジェクトです。

適用対象