Coding similar classes from different subloops

Post author

Looking to do something like the below for many of the EdiFabric classes to save on coding.  Is there already some code or tools to do something like this (convert HL_*** to HL_### for the Edifabric classes.

For example  NM1, N3, TRN, DMG, INS......    


// main program

loop2000A.HL_InformationSourceLevel = (HL_InformationSourceLevel) GetHL(HL_InformationSourceLevel, new HL_InformationSourceLevel());

loop2000B.HL_InformationReceiverLevel = (HL_InformationReceiverLevel_2 ) GetHL(hlInformationReceiverLevel, new HL_InformationReceiverLevel_2 ())


public static I_HL GetHL(HL hlInformation, I_HL hlInComing)


                hlInComing.HierarchicalIDNumber_01 = hlInformation.HierarchicalIDNumber_01;

                hlInComing.HierarchicalParentIDNumber_02 = hlInformation.HierarchicalParentIDNumber_02;

                hlInComing.HierarchicalLevelCode_03 = hlInformation.HierarchicalLevelCode_03;

                hlInComing.HierarchicalChildCode_04 = hlInformation.HierarchicalChildCode_04;

                return hlInComing;



1 comment

  • Comment author


    All segment and complex element classes have a base class and implement an interface, which you can use to populate/map once per item.


Please sign in to leave a comment.