OneWayBindingElement.GetProperty<T>(BindingContext) 方法

定义

从绑定堆栈中获取属性(如果存在)。Gets properties from the binding stack, if present.

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

属性的类型。Type of the property.

参数

context
BindingContext

为绑定元素提供上下文的 BindingContextThe BindingContext that provides context for the binding element.

返回

T

绑定堆栈中的一个 T 对象(如果存在)。A T object from the binding stack, if present.

注解

此方法接收绑定上下文作为输入参数,该参数表示绑定元素的堆栈。This method receives a binding context as an input parameter, which represents the stack of binding elements.

堆栈中的每个绑定元素都可以独立处理查询或委托查询,或两种功能都具备。Each binding element in the stack can handle the inquiry itself or delegate the inquiry, or a combination of the two. 如果委托查询,每个绑定元素都可以修改上下文。Each binding element can modify the context if it delegates the inquiry. 但是,传输绑定元素独立处理查询。However, a transport binding element handles the inquiry itself.

此方法由绑定元素以及运行时对象(例如 IChannelFactoryIChannelListenerIChannel)实现。This method is implemented by binding elements as well as by the runtime objects, such as IChannelFactory, IChannelListener, and IChannel.

适用于