OneWayBindingElement.GetProperty<T>(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

T绑定堆栈中的对象(如果存在)。

注解

此方法接收绑定上下文作为输入参数,该参数表示绑定元素的堆栈。

堆栈中的每个绑定元素都可以处理查询本身或委托查询,或两者的组合。 如果每个绑定元素委托查询,则可以修改上下文。 但是,传输绑定元素处理查询本身。

此方法由绑定元素以及运行时对象(例如 IChannelFactoryIChannelListenerIChannel)实现。

适用于