Пример #1
0
        /*
         * Собственно, запуск процессора.
         */
        public void Process()
        {
            if (fileSource != null)
            {
                fileSource.Open();

                IDataRecord dataRecord;

                while ((dataRecord = fileSource.GetNextRecord()) != null)
                {
                    try
                    {
                        ToffLead lead = DataTransformer.MakeToffLead(dataRecord);

                        if (lead != null)
                        {
                            logLines.Add(string.Format(PATTERN_MESSAGE, lead.innOrOgrn, ToffAPI.createApplication(lead)));
                        }
                    }
                    catch (Exception e)
                    {
                        logLines.Add(e.ToString());
                    }
                }

                fileSource.Close();
            }
        }