語言

TransactionFlowBindingElement.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類型物件null就請求;如果沒有。

例外狀況

context 是 null。

備註

你可以用這個方法從綁定元素堆疊中取得能力、需求和參數。 如果綁定元素支援回傳所請求的物件,它就會回傳該物件。 若不行,則會將呼叫委派給堆疊中的下一個綁定元素。 如果它到達堆疊底部且沒有任何綁定元素支援該請求物件,此方法會回傳 null。

適用於