Method GetAttribute
GetAttribute(TKey)
Gets attribute value. Returns null
if there is no such attribute.
TValue? GetAttribute(TKey id)
Parameters
id
TKeyAttribute identifier.
Returns
- TValue
GetAttribute<T2>(TKey)
Gets attribute value as TKey
type.
T2? GetAttribute<T2>(TKey id) where T2 : TValue
Parameters
id
TKeyAttribute identifier.
Returns
- T2
Type Parameters
T2
Type of the result.
GetAttribute<T2>(TKey, T2)
Gets attribute value as T2
type or defaultValue
if there is no such attribute.
T2 GetAttribute<T2>(TKey id, T2 defaultValue) where T2 : TValue
Parameters
id
TKeyAttribute identifier.
defaultValue
T2Default value used ud there is no such attribute.
Returns
- T2
Type Parameters
T2
Type of the result.