Skip to content

IParser

IParser<T> is the minimal shared parsing contract used by both independent subsystems in this library: the flat-file record parsing path and the EDI segment/element parsers. EdiSegmentParser, EdiDataElementParser, and EdiCompositeDataElementParser (in the SAIF.Common.Files.Edi.Core.Parsers namespace) all implement it, making it the only coupling point between the flat-file and EDI subsystems in this library*.

Purpose

  • Defines a single Parse operation that converts a raw string into a list of typed results, allowing callers to depend on a common abstraction regardless of whether the underlying implementation parses a delimited/fixed-width line or an EDI segment/element.

Context

  • Namespace: SAIF.Common.Files
  • Assembly/package: SAIF.Framework.Common.Files

Public members

Member Signature Purpose
Parse List<T> Parse(string stringToParse) Parses the supplied raw string and returns the resulting collection of T instances; the parsing rules (delimiter, segment structure, etc.) are defined entirely by the implementing type.

Behavioral notes

  • The generic constraint where T : class restricts implementations to reference-type results.
  • No implementation of this interface lives in the flat-file (SAIF.Common.Files.Core) namespace directly; it is implemented only by the EDI segment/element parser types*.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Common\SAIF.Common.Files\IParser.cs