C# Class EdiFabric.Sdk.EdiToObject.ConsoleApplication.X12Samples

X12Stream reads item by item from the EDI file stream. The final structure looks like this: ISA GS Message or ParsingException ... (the rest of the messages or errors)... GE IEA ... (the rest of the interchanges) ...
Mostrar archivo Open project: DonZoeggerle/ediFabric.Sdk.EdiToObject

Public Methods

Method Description
AccessInterchangeSegments ( ) : void

Get the interchange header and trailer as typed objects.

HandleErrors ( ) : void

Extract all of the errors. The framework does not raise errors. Instead it contains the errors in ParsingException items. This allows the stream to not block, should a message error is raised.

ParseAll ( ) : void

Reads through all items - messages, control segments and errors. Reads the whole stream altogether.

ParseAllStreaming ( ) : void

Reads through all items - messages, control segments and errors. Reads an item at a time.

ParseWithCustomEncoding ( ) : void

Parse with custom encoding. The default encoding is Encoding.Default .

ParseWithExplicitRulesAssemblyName ( ) : void

Parse with rules assembly name. Can be used if assembly name was not set in the .config or if the rules classes are spread across multiple assemblies.

ParseWithNonDefaultClass ( ) : void

Parse with custom namespace prefix. All classes can have custom namespace prefix, e.g. everything before the last part (starting with .X12) can be customized. Can be used if multiple versions of the same transaction set need to be used.

PullDifferentMessageTypes ( ) : void

Extract only certain messages. EDI files can contain multiple groups with each group containing different message types. Although all will be parsed (if a rules class exist otherwise an error item will be created), only a subset can be pulled out.

Method Details

AccessInterchangeSegments() public static method

Get the interchange header and trailer as typed objects.
public static AccessInterchangeSegments ( ) : void
return void

HandleErrors() public static method

Extract all of the errors. The framework does not raise errors. Instead it contains the errors in ParsingException items. This allows the stream to not block, should a message error is raised.
public static HandleErrors ( ) : void
return void

ParseAll() public static method

Reads through all items - messages, control segments and errors. Reads the whole stream altogether.
public static ParseAll ( ) : void
return void

ParseAllStreaming() public static method

Reads through all items - messages, control segments and errors. Reads an item at a time.
public static ParseAllStreaming ( ) : void
return void

ParseWithCustomEncoding() public static method

Parse with custom encoding. The default encoding is Encoding.Default .
public static ParseWithCustomEncoding ( ) : void
return void

ParseWithExplicitRulesAssemblyName() public static method

Parse with rules assembly name. Can be used if assembly name was not set in the .config or if the rules classes are spread across multiple assemblies.
public static ParseWithExplicitRulesAssemblyName ( ) : void
return void

ParseWithNonDefaultClass() public static method

Parse with custom namespace prefix. All classes can have custom namespace prefix, e.g. everything before the last part (starting with .X12) can be customized. Can be used if multiple versions of the same transaction set need to be used.
public static ParseWithNonDefaultClass ( ) : void
return void

PullDifferentMessageTypes() public static method

Extract only certain messages. EDI files can contain multiple groups with each group containing different message types. Although all will be parsed (if a rules class exist otherwise an error item will be created), only a subset can be pulled out.
public static PullDifferentMessageTypes ( ) : void
return void