Share via


SecurityTokenRequirement.GetProperty<TValue>(String) 方法

定義

取得目前 SecurityTokenRequirement 執行個體的指定屬性。

public:
generic <typename TValue>
 TValue GetProperty(System::String ^ propertyName);
public TValue GetProperty<TValue> (string propertyName);
member this.GetProperty : string -> 'Value
Public Function GetProperty(Of TValue) (propertyName As String) As TValue

類型參數

TValue

要取得的屬性型別。

參數

propertyName
String

要取得的屬性名稱。

傳回

TValue

要取得的屬性值。

例外狀況

propertyNamenull

備註

GetProperty 方法會先呼叫 TryGetProperty<TValue>(String, TValue) 方法,判定是否已設定 propertyName 參數中所指定的屬性。 其次,GetProperty 方法會確認在傳回屬性值時,這個值是否能設定為 TValue 參數中所指定的型別。

適用於