Class Iso8211SubfieldGroup
Represents a group of subfields from a repeating subfield group.
public sealed class Iso8211SubfieldGroup
- Inheritance
-
Iso8211SubfieldGroup
- Inherited Members
Remarks
This class provides access to the values of subfields within a single repetition of a repeating subfield group.
Properties
Count
Gets the number of subfields in this group.
public int Count { get; }
Property Value
Index
Gets the zero-based index of this group within the field's repeating groups.
public int Index { get; }
Property Value
Methods
GetSubfieldAt<T>(int)
Gets the value of a subfield within this group by its position.
public T GetSubfieldAt<T>(int index)
Parameters
indexintThe zero-based index of the subfield within this group.
Returns
- T
The subfield value converted to type
T.
Type Parameters
TThe type to convert the subfield value to.
Exceptions
- ArgumentOutOfRangeException
Thrown when
indexis outside the valid range.
GetSubfieldBytes(string)
Gets the raw bytes of a subfield within this group by name.
public ReadOnlySpan<byte> GetSubfieldBytes(string name)
Parameters
namestringThe name of the subfield to retrieve.
Returns
- ReadOnlySpan<byte>
A span containing the raw subfield data.
Exceptions
- KeyNotFoundException
Thrown when no subfield with the specified name exists in this group.
GetSubfield<T>(string)
Gets the value of a subfield within this group by name.
public T GetSubfield<T>(string name)
Parameters
namestringThe name of the subfield to retrieve.
Returns
- T
The subfield value converted to type
T.
Type Parameters
TThe type to convert the subfield value to.
Exceptions
- KeyNotFoundException
Thrown when no subfield with the specified name exists in this group.