CompositeDuplexBindingElement.GetProperty<T>(BindingContext) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個從通道堆疊中相應層請求的類型物件。
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 是否支援;或 null 是否支援。
例外狀況
context 是 null。
備註
利用此功能向堆疊綁定中相應層請求一個有型別的物件,例如設定屬性或取得狀態的介面。 如果某層支援回傳所請求的物件,則會回傳該物件。 如果沒有,則會將呼叫委派到堆疊的下一層。 如果它到堆疊底部且沒有任何層支援取得該物件,呼叫者會回傳一個 null 值。