ValueElementT

ValueElement<T> class

Encapsulates basic functionality for non text VR types (VR types that use .NET structures as underlying value type and ‘Attribute Tag’ VR).

public abstract class ValueElement<T> : IElement
ParameterDescription
TValue Type.

Properties

NameDescription
Count { get; }The number of elements contained in this element. Read-only Int32.
Data { get; }Data of the element. Read-only IReadOnlyCollection of T.
Tag { get; }
abstract ValueRepresentation { get; }

Methods

NameDescription
Add(T)Adds the given value to the collection of values of this element.
AddRange(Span<T>)Adds the given values to the collection of values of this element.
ConvertData<TOutput>(Func<T, TOutput>)Converts the element data to the specified type and returns the converted data.
Get(int)Gets the element value stored at the given position.
Get<TValue>(Index)
Get<TValue>(int)
GetOrDefault<TValue>(Index)
GetOrDefault<TValue>(int)
GetSingleOrDefault()Gets the element value, whose value multiplicity has to be 1.
GetValues()Returns the element’s values.
GetValues(Range)Returns the element’s values at the specified range.
GetValues<TValue>()
GetValues<TValue>(Range)
Insert(int, T)Inserts the given value into this element at a given index. The size of the list is increased by one.
Remove(T)Removes the first occurrence of a specific value from the element.
RemoveAt(int)Removes the value at the specified index of the element.
Replace(IEnumerable<T>)Replaces the current values by the collection of the given values.
override ToString()
TryGetValue<TValue>(Index, out TValue)
TryGetValue<TValue>(int, out TValue)

See Also