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

例外狀況

contextnull

備註

您可以使用這個方法從繫結程序項目堆疊擷取功能、需求與參數。 如果某個繫結項目支援傳回要求的物件,它就會傳回物件。 如果不支援,則會將該呼叫向下委派到堆疊中的下一個繫結項目。 如果到達堆疊的底部,而且沒有任何繫結項目支援要求的物件,這個方法會傳回 null

適用於