Class Segments
- Namespace
- EDIParser
- Assembly
- EDIParser.dll
Represents an ordered collection of EDI segments.
public sealed class Segments : ItemObjectCollection, IEnumerable<Segment>, IEnumerable
- Inheritance
-
Segments
- Implements
- Inherited Members
Remarks
Segments are stored using one-based numeric string keys to support messages containing repeated segment names.
Constructors
Segments()
Initializes a new instance of the Segments collection.
public Segments()
Properties
this[int]
Gets a segment using its one-based position.
public Segment this[int oneBasedIndex] { get; }
Parameters
oneBasedIndexintThe one-based segment position.
Property Value
- Segment
The segment at the specified position.
this[object]
Gets a segment by matching an existing segment object.
public Segment this[object index] { get; }
Parameters
indexobjectThe segment object to locate.
Property Value
- Segment
The matching segment.
this[string]
Gets a segment using its collection key.
public Segment this[string key] { get; }
Parameters
keystringThe one-based numeric string key assigned when the message was parsed.
Property Value
- Segment
The segment associated with the specified key.
Remarks
The current collection keys are numeric strings such as "1",
"2", and "3". Segment-name lookup is not currently supported
because EDI messages may contain repeated segment identifiers.