Class FinSegmentScanner
Inheritance
Inherited Members
Namespace: Subsembly.FinTS
Assembly: Subsembly.FinTS.Core.dll
Syntax
public class FinSegmentScanner
Properties
BinLength
Provides the value of the most recently collected binary length field.
Declaration
public int BinLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DEG
The DEG position of the current element.
Declaration
public int DEG { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
EndOfSegment
True if the scanner is already at the end of the segment.
Declaration
public bool EndOfSegment { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
GD
The GD position of the current element.
Declaration
public int GD { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Length
Provides the total number of bytes that have been consumed so far.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This value can be used to indicate the exact byte position of a parsing error or to get the total segment length in the EndOfSegment state.
PrevDEG
The DEG position of the previous element.
Declaration
public int PrevDEG { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PrevGD
The GD position of the previous element.
Declaration
public int PrevGD { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
State
The current state of this segment scanner instance.
Declaration
public FinSegmentScannerState State { get; }
Property Value
Type | Description |
---|---|
FinSegmentScannerState |
Methods
Restart()
Restart the segment scanner to scan another segment.
Declaration
public void Restart()
Scan(Byte)
Processes the input byte according to the current state.
Declaration
public FinSegmentScannerState Scan(byte ch)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | ch | The input byte to be processed. |
Returns
Type | Description |
---|---|
FinSegmentScannerState | Returns the new scanner state that is the result of processing the input byte in the context of the current state. The new scanner state can be used to determine what to do with the input byte. See FinSegmentScannerState for a description of the states. |