Binding.GetProperty<T>(BindingParameterCollection) 方法

定義

從繫結堆疊的適當層次中,傳回要求的型別物件 (如果有)。Returns a typed object requested, if present, from the appropriate layer in the binding stack.

public:
generic <typename T>
 where T : class T GetProperty(System::ServiceModel::Channels::BindingParameterCollection ^ parameters);
public T GetProperty<T> (System.ServiceModel.Channels.BindingParameterCollection parameters) where T : class;
member this.GetProperty : System.ServiceModel.Channels.BindingParameterCollection -> 'T (requires 'T : null)
Public Function GetProperty(Of T As Class) (parameters As BindingParameterCollection) As T

類型參數

T

此方法正在查詢的型別物件。The typed object for which the method is querying.

參數

parameters
BindingParameterCollection

指定所建置之通道接聽程式需求的 BindingParameterCollectionThe BindingParameterCollection that specifies requirements for the channel listener that is built.

傳回

T

要求的型別物件 T (如果存在的話),如果不存在則為 nullThe typed object T requested if it is present or null if it is not.

備註

如果某個層次支援傳回要求的物件,它就會傳回物件。If a layer supports returning the requested object, it returns it. 如果不是,則會將呼叫向下委派到堆疊中的下一層。If not, it delegates the call down to the next layer in the stack. 如果到達堆疊的底部,而且沒有任何層次支援要求的物件,則該方法會傳回 nullIf it gets to the bottom of the stack and no layer supported the requested object, then the method returns null.

適用於