Skip to content

EdiElement

EdiElement is the shared abstract base for EdiSegment, EdiDataElement, and EdiCompositeDataElement, carrying the ordinal position, raw text value, and element-kind classification common to every parsed EDI element so consumers can treat segments and data elements uniformly through IEdiElement.

Purpose

  • Holds the Index (ordinal position within its parent) and Value (raw text) shared by every EDI element kind.
  • Declares the abstract Type property, forcing each concrete subclass to self-identify as Segment, DataElement, or CompositeDataElement, which callers use to distinguish element kinds without type-checking.

Context

  • Namespace: SAIF.Common.Files.Edi
  • Assembly/package: SAIF.Framework.Common.Files
  • Implements: IEdiElement

Public members

Member Signature Purpose
Index public int Index { get; set; } The element's ordinal position within its parent (segment position within a file, or data-element position within a segment).
Value public string Value { get; set; } The raw text value of this element as parsed from, or to be serialized into, the EDI interchange.
Type public abstract ElementType Type { get; } Identifies which concrete element kind this instance is (Segment, DataElement, or CompositeDataElement); each subclass overrides this to return its fixed kind.

Sources

  • Common\SAIF.Common.Files\Edi\EdiElement.cs