共用方式為


WindowsStreamSecurityBindingElement.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

要取得的物件。

參數

傳回

T

來自 BindingContext 的指定物件,如果找不到該物件,則為 null

備註

這個方法會接收繫結內容當做輸入參數,該參數表示繫結項目的堆疊。 這個方法會直接取得指定的物件、將查詢委派給堆疊中下一個較低層的繫結項目,或是結合這兩者。 如果它委派查詢,它就可以修改內容。 堆疊中的每一個繫結項目都可以重複此程序 (如果已獲得委派),一直到堆疊的底部。 傳回的物件通常是屬性的集合。

如果 T 的型別為 ISecurityCapabilities,則會使用 SupportsClientAuthentication 傳回這個類別的執行個體。

SupportsClientWindowsIdentitySupportsServerAuthentication 全部設為 true,而 SupportedRequestProtectionLevelSupportedResponseProtectionLevel 則設為這個繫結的目前值。

如果 T 的型別為 IdentityVerifier,則會傳回此類別的預設執行個體。

這個方法會由繫結項目以及執行階段物件 (如 IChannelFactoryIChannelListenerIChannel) 所實作。

適用於