public void ParseSource() { int iMaxPosition = 0; iMaxPosition = GetMaxPosition(); if (Source.Length < iMaxPosition) { throw new Exception("File Layout Appears Invlaid. FileHeader record appears too short."); } foreach (Field f in lsFields) { f.Value = Source.Substring(f.StartPOS - 1, f.EndPOS - f.StartPOS + 1); } int iClaimsCount = NumberofClaims; int iClaimStartPos = GetMaxPosition(); string sWorkingSource = Source.Substring(iClaimStartPos); for (int x = 0; x < iClaimsCount; x++) { Utility.SendProgress("Parsing Claims...", x, iClaimsCount); ClaimHeader ch = new ClaimHeader(sWorkingSource, FileVersion); sWorkingSource = ch.ParseSource(); AddClaimHeader(ch); } Utility.SendProgress("Parsing Claims...", iClaimsCount, iClaimsCount); }
private void AddClaimHeader(ClaimHeader ch) { lsdch.Add(ch); }