WebMessageEncodingBindingElement.GetProperty<T>(BindingContext) 方法

定義

如果存在,則從通道堆疊中的適當層級傳回所要求型別的物件,如果不存在,則為 null

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

備註

這個覆寫會將一個屬性新增至基底 GetProperty<T>(BindingContext) 實作:當 TXmlDictionaryReaderQuotas,並傳回 ReaderQuotas 屬性時。

適用於