SecurityTokenRequirement.GetProperty<TValue>(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取当前 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 类型。