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