语言

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

要获取的属性的值。

例外

propertyName 是 null。

注解

该方法 GetProperty 首先调用 TryGetProperty<TValue>(String, TValue) 该方法以确定参数中指定的 propertyName 属性是否已设置。 其次, GetProperty 该方法验证当返回属性值时,是否可以将其设置为参数中指定的 TValue 类型。

适用于