Analyzer.AnalyzerBase.ReportProgress C# (CSharp) Method

ReportProgress() protected method

protected ReportProgress ( Int32 iCalculationsSoFar, Int32 iTotalCalculations, BackgroundWorker oBackgroundWorker ) : void
iCalculationsSoFar System.Int32
iTotalCalculations System.Int32
oBackgroundWorker System.ComponentModel.BackgroundWorker
return void
        protected void ReportProgress
            (Int32 iCalculationsSoFar, Int32 iTotalCalculations, BackgroundWorker oBackgroundWorker)
        {
            Debug.Assert(iCalculationsSoFar >= 0);
            Debug.Assert(iTotalCalculations >= 0);
            Debug.Assert(iCalculationsSoFar <= iTotalCalculations);


            if (oBackgroundWorker != null)
            {
                String sProgress = String.Format(

                    "Calculating {0}."
                    ,
                    this.AnalyzerDescription
                    );

                oBackgroundWorker.ReportProgress(

                    CalculateProgressInPercent(iCalculationsSoFar,
                        iTotalCalculations),

                    sProgress);
            }
        }