private void StartValidateXtronFMWithGATSGenertor()
        {
            List <string> ricList = new List <string>();

            try
            {
                ricList = GetMainRic(configObj.FMFilePath);
                foreach (string ric in ricList)
                {
                    int    order    = 0;
                    string chainRic = string.Format("{0}#{1}", order, ric);
                    string lineText;
                    do
                    {
                        string outRicsFilePath;
                        GetRics(chainRic, out outRicsFilePath);
                        StreamReader sr = new StreamReader(outRicsFilePath);
                        lineText = sr.ReadToEnd();
                        sr.Close();
                        order++;
                        chainRic = string.Format("{0}#{1}", order, ric);
                    } while (!string.IsNullOrEmpty(lineText));
                }

                string   outRicsFileDir   = Path.Combine(configObj.OutputDir, configObj.OutRicsFoldr);
                string[] ricsFileFullPath = Directory.GetFiles(outRicsFileDir, "*.txt", SearchOption.AllDirectories);
                foreach (string ric in ricList)
                {
                    MainRicRecord  mainRicRecord  = new MainRicRecord(ric);
                    ChainRicRecord chainRicRecord = new ChainRicRecord(mainRicRecord);
                    chainRicRecord.RicList = new List <RicRecord>();
                    for (int i = 0; i < ricsFileFullPath.Length; i++)
                    {
                        string ricsFileName = Path.GetFileName(ricsFileFullPath[i]);
                        if (ricsFileName.Contains(ric))
                        {
                            StreamReader sr = new StreamReader(ricsFileFullPath[i]);
                            string       line;
                            while ((line = sr.ReadLine()) != null)
                            {
                                string[] lineArray = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                                if (lineArray.Length == 3)
                                {
                                    chainRicRecord.RicList.Add(new RicRecord(lineArray[2], "0"));
                                }
                            }
                            sr.Close();
                        }
                    }
                    chainRicList.Add(chainRicRecord);
                }

                GetRicFields(chainRicList);
                GenerateComparedAndValidationFile(chainRicList);
            }
            catch (Exception ex)
            {
                Logger.LogErrorAndRaiseException(string.Format("Error happens when generating output files. Ex: {0} .", ex.Message));
            }
        }
 public ChainRicRecord(MainRicRecord mainRic)
 {
     MainRic = mainRic;
 }