Table of Contents

Class Iso8211SubfieldGroup

Namespace
EncDotNet.Iso8211
Assembly
EncDotNet.Iso8211.dll

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

int

Index

Gets the zero-based index of this group within the field's repeating groups.

public int Index { get; }

Property Value

int

Methods

GetSubfieldAt<T>(int)

Gets the value of a subfield within this group by its position.

public T GetSubfieldAt<T>(int index)

Parameters

index int

The zero-based index of the subfield within this group.

Returns

T

The subfield value converted to type T.

Type Parameters

T

The type to convert the subfield value to.

Exceptions

ArgumentOutOfRangeException

Thrown when index is 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

name string

The 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

name string

The name of the subfield to retrieve.

Returns

T

The subfield value converted to type T.

Type Parameters

T

The type to convert the subfield value to.

Exceptions

KeyNotFoundException

Thrown when no subfield with the specified name exists in this group.