Ejemplo n.º 1
0
 public void ProcessAddresses(List<Segment> lst, IEdiMessage ediMessage)
 {
     lst.RemoveWhile(seg => seg.Label != EDIConstants.AddressNameLabel);
     var addr_loop = new List<Segment>();
     while (EDIUtilities.MoveSegmentByLabel(lst, addr_loop, EDIConstants.AddressNameLabel))
     {
         SegmentCount++;
         Segment next_seg = lst[0];
         while (next_seg.Label == EDIConstants.AddressLineLabel
                || next_seg.Label == EDIConstants.GeographicLabel)
         {
             SegmentCount++;
             EDIUtilities.MoveSegment(lst, addr_loop, next_seg);
             next_seg = lst[0];
         }
         ediMessage.AddAddress(process_address(addr_loop));
         addr_loop.Clear();
     }
 }
Ejemplo n.º 2
0
        public void ProcessAddresses(List <Segment> lst, IEdiMessage ediMessage)
        {
            lst.RemoveWhile(seg => seg.Label != EDIConstants.AddressNameLabel);
            var addr_loop = new List <Segment>();

            while (EDIUtilities.MoveSegmentByLabel(lst, addr_loop, EDIConstants.AddressNameLabel))
            {
                SegmentCount++;
                Segment next_seg = lst[0];
                while (next_seg.Label == EDIConstants.AddressLineLabel ||
                       next_seg.Label == EDIConstants.GeographicLabel)
                {
                    SegmentCount++;
                    EDIUtilities.MoveSegment(lst, addr_loop, next_seg);
                    next_seg = lst[0];
                }
                ediMessage.AddAddress(process_address(addr_loop));
                addr_loop.Clear();
            }
        }