Exemple #1
0
        private void SymbolFileSegmentReader_Progress(SymbolFileSegmentReader aReader, long aTotalNumberOfLines, long aChunkSizeProcessed)
        {
            bool report   = false;
            int  progress = 0;

            //
            lock ( iSyncRoot )
            {
                iProgressSoFar += aChunkSizeProcessed;
                //
                float progressF = (float)iProgressSoFar / (float)iTotalNumberOfLines;
                progress = (int)(progressF * 100.0f);
                //
                if (iProgressLastReported != progress)
                {
                    iProgressLastReported = progress;
                    report = true;
                }
                //
                if (report)
                {
                    System.Diagnostics.Debug.WriteLine("SymbolFileReader - progress: " + progress);
                    iSource.ReportEvent(SymSource.TEvent.EReadingProgress, progress);
                }
            }
        }
Exemple #2
0
        protected override bool Process(SymbolFileSegment aItem)
        {
            SymbolFileSegmentReader reader = new SymbolFileSegmentReader(aItem);

            reader.Progress += new SymbolFileSegmentReader.ProgressHandler(SymbolFileSegmentReader_Progress);
            reader.Read(TSynchronicity.ESynchronous);
            return(true);
        }