Table of Contents

Class Iso8211RecordBuilder

Namespace
EncDotNet.Iso8211
Assembly
EncDotNet.Iso8211.dll

Builds an Iso8211Record from a set of fields, computing its directory and leader.

public sealed class Iso8211RecordBuilder
Inheritance
Iso8211RecordBuilder
Inherited Members

Remarks

The builder recomputes the record length, base address, directory entries, and (when AutoSizeDirectoryEntries is enabled) the entry-map sizes from the added fields, while preserving the leader flag characters configured on the builder.

Constructors

Iso8211RecordBuilder(Iso8211WriterOptions?)

Initializes a new instance of the Iso8211RecordBuilder class.

public Iso8211RecordBuilder(Iso8211WriterOptions? options = null)

Parameters

options Iso8211WriterOptions

Optional writer options. Defaults to Default.

Properties

ApplicationIndicator

Gets or sets the application indicator character. Defaults to a space.

public char ApplicationIndicator { get; set; }

Property Value

char

ExtendedCharacterSetIndicator

Gets or sets the three-character extended character set indicator. Defaults to three spaces.

public string ExtendedCharacterSetIndicator { get; set; }

Property Value

string

FieldControlLength

Gets or sets the field control length recorded in the leader. Defaults to 0.

public int FieldControlLength { get; set; }

Property Value

int

InlineCodeExtensionIndicator

Gets or sets the inline code extension indicator. Defaults to 'E'.

public char InlineCodeExtensionIndicator { get; set; }

Property Value

char

InterchangeLevel

Gets or sets the interchange level character. Defaults to '3'.

public char InterchangeLevel { get; set; }

Property Value

char

LeaderIdentifier

Gets or sets the leader identifier ('L' for a DDR, 'D' for a data record). Defaults to 'D'.

public char LeaderIdentifier { get; set; }

Property Value

char

SizeOfFieldLengthField

Gets or sets the declared size of the field length field, or 0 to auto-size. Defaults to 0.

public int SizeOfFieldLengthField { get; set; }

Property Value

int

SizeOfFieldPositionField

Gets or sets the declared size of the field position field, or 0 to auto-size. Defaults to 0.

public int SizeOfFieldPositionField { get; set; }

Property Value

int

SizeOfFieldTagField

Gets or sets the declared size of the field tag field. Defaults to 4.

public int SizeOfFieldTagField { get; set; }

Property Value

int

Remarks

Ignored when AutoSizeDirectoryEntries is enabled.

VersionNumber

Gets or sets the version number character. Defaults to '1'.

public char VersionNumber { get; set; }

Property Value

char

Methods

AddField(Iso8211Field)

Adds a field to the record.

public Iso8211RecordBuilder AddField(Iso8211Field field)

Parameters

field Iso8211Field

The field to add.

Returns

Iso8211RecordBuilder

This builder, for chaining.

AddField(Iso8211FieldBuilder)

Builds a field with Iso8211FieldBuilder and adds it to the record.

public Iso8211RecordBuilder AddField(Iso8211FieldBuilder fieldBuilder)

Parameters

fieldBuilder Iso8211FieldBuilder

The field builder to build and add.

Returns

Iso8211RecordBuilder

This builder, for chaining.

AddField(string, byte[])

Adds a field from a tag and pre-encoded field data.

public Iso8211RecordBuilder AddField(string tag, byte[] data)

Parameters

tag string

The field tag.

data byte[]

The field data, excluding the trailing field terminator.

Returns

Iso8211RecordBuilder

This builder, for chaining.

Build()

Builds the Iso8211Record with a computed directory and leader.

public Iso8211Record Build()

Returns

Iso8211Record

The built record.