Edifact.Core
1.0.0-preview.5
See the version list below for details.
dotnet add package Edifact.Core --version 1.0.0-preview.5
NuGet\Install-Package Edifact.Core -Version 1.0.0-preview.5
<PackageReference Include="Edifact.Core" Version="1.0.0-preview.5" />
<PackageVersion Include="Edifact.Core" Version="1.0.0-preview.5" />
<PackageReference Include="Edifact.Core" />
paket add Edifact.Core --version 1.0.0-preview.5
#r "nuget: Edifact.Core, 1.0.0-preview.5"
#:package Edifact.Core@1.0.0-preview.5
#addin nuget:?package=Edifact.Core&version=1.0.0-preview.5&prerelease
#tool nuget:?package=Edifact.Core&version=1.0.0-preview.5&prerelease
Edifact.Core
The layer below any directory: an ISO 9735 tokenizer and writer, delimiter and character repertoire
handling, and the finding, severity and EDI path types every other Edifact.* package reports
through.
This is the only package here that needs no directory data at all. It answers questions about
characters — where the delimiters are, which of them were released, where one segment ends and the
next begins — and it answers them for a file nobody has a directory for. It does not know what
INVOIC is and cannot tell you whether a segment belongs where it sits; that is
Edifact.Structure and
Edifact.Validation.
Install
dotnet add package Edifact.Core --prerelease
net8.0 and net10.0, no external dependencies.
Use it
using Edifact.Core.Diagnostics;
using Edifact.Core.Syntax;
var text = File.ReadAllText("interchange.edi");
// Nothing on this path throws. A truncated transmission, a stray release character, an
// unterminated final segment — all of it comes back as segments plus findings.
var result = EdifactTokenizer.Tokenize(text);
foreach (var segment in result.Segments)
{
// Value(element, component); both are zero-based, so this is NAD's first qualifier.
Console.WriteLine($"{segment.Tag} {segment.Value(0)} (segment #{segment.Index})");
}
foreach (var finding in result.Findings)
{
// FATAL SYNTAX.UNTERMINATED at 42:18: The interchange ends inside a segment.
Console.WriteLine(finding);
}
Console.WriteLine(result.Syntax.Delimiters.ToUna()); // UNA:+.? '
Console.WriteLine(result.Syntax.HadUna); // whether it was declared or assumed
The property this package exists to hold
Reading an interchange and writing it back gives the same characters — the delimiters it arrived with, the release characters somebody used redundantly, the line ending, the trailing newline, and the fragment of a segment a truncated transmission ended in the middle of:
var reproduced = EdifactWriter.Write(result) == text; // true
That is the correctness asset the whole library is built on, because it is the only check that
fails when something is quietly dropped rather than misunderstood. EdifactWriter.Write also
takes any IEnumerable<RawSegment> with an InterchangeSyntax, which is how a composed message —
one that was never read from a file — gets written.
Findings
Every diagnostic in the library is a Finding: a Severity, a stable dotted RuleId such as
SYNTAX.UNTERMINATED, an EdiPath, a SourceSpan carrying both the text offset and the 1-based
segment, element and component positions, a sentence written for a person, and a Provenance
saying which authority the broken rule came from. Severity is ordered — Information, Warning,
Error, Fatal — so finding.Severity >= Severity.Error filters the way it reads.
An unknown code value is a Warning, not an Error. Published code lists are advisory on their
own and interchange agreements extend them routinely, so rejecting on one would reject valid
traffic.
Where this sits
Edifact.Core references nothing, which is what lets a file nobody has a directory for still be
read and shown to somebody. Everything else is layered over it:
Edifact.Schema (what a release says),
Edifact.Structure (matching a segment table),
Edifact.Validation (the usual entry point),
Edifact.Projection,
Edifact.Overlays,
Edifact.Untdid and
Edifact.Acknowledgement. The
edifact CLI is the same code as a tool.
Full documentation: https://github.com/101-semaphore/EDIFACT.
Licence
Apache-2.0. See the NOTICE in this package for what the wider project is derived from and under
what terms.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Edifact.Core:
| Package | Downloads |
|---|---|
|
Edifact.Schema
The compiled directory format — segments, composites, elements, code lists and message specifications — with the reader, writer and linker that turn a pack on disk into a resolved schema. |
|
|
Edifact.Structure
Matches a segment stream against a message's segment table, resolving segment group nesting and repetition into a message tree with every position accounted for. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.6 | 95 | 10/11/2026 |
| 1.0.0-preview.5 | 112 | 9/19/2026 |
| 1.0.0-preview.4 | 99 | 9/17/2026 |
| 1.0.0-preview.3 | 152 | 9/7/2026 |
| 1.0.0-preview.2 | 133 | 9/6/2026 |
| 1.0.0-preview.1 | 113 | 9/6/2026 |