Table of Contents

Method GetAttribute

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetAttribute(TKey)

Gets attribute value. Returns null if there is no such attribute.

TValue? GetAttribute(TKey id)

Parameters

id TKey

Attribute identifier.

Returns

TValue

GetAttribute<T2>(TKey)

Gets attribute value as TKey type.

T2? GetAttribute<T2>(TKey id) where T2 : TValue

Parameters

id TKey

Attribute 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 TKey

Attribute identifier.

defaultValue T2

Default value used ud there is no such attribute.

Returns

T2

Type Parameters

T2

Type of the result.