Share via


NamedPipeTransportBindingElement.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

取得するオブジェクト。

パラメーター

戻り値

T

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

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

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

bool SupportsServerAuthentication =
    b.SupportsServerAuthentication;
Dim binding As New BasicHttpBinding()
Dim b As ISecurityCapabilities = binding.GetProperty(Of ISecurityCapabilities)(New BindingParameterCollection())

Dim SupportsServerAuthentication As Boolean = b.SupportsServerAuthentication

注釈

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

適用対象