public MissingPlayerDataChecker(ISend sender) { Sender = sender; MyRunStorer = new DbfRunStorer(); Stopwatch = new Stopwatch(); Stopwatch.Start(); }
public RosterGridReport() { Logger = NLog.LogManager.GetCurrentClassLogger(); // default to look at the current season Season = SeasonBoss.CurrentSeason(); MyRunStorer = new DbfRunStorer(); Stopwatch = new Stopwatch(); Stopwatch.Start(); TflFolder = Config.TflFolder(); SetLastRunDate(); }
public static void ExecuteStep(Action stepMethod, Func <bool> goNogoMethod) { if (goNogoMethod()) { var runStorer = new DbfRunStorer(); ExecuteStep(stepMethod, runStorer); } else { Announce(string.Format("{0} skipped.", stepMethod.Method.Name), 0); } }
public RosterGridReport(IKeepTheTime timekeeper) { Logger = LogManager.GetCurrentClassLogger(); // default to look at the current season MyRunStorer = new DbfRunStorer(); Stopwatch = new Stopwatch(); Stopwatch.Start(); TimeKeeper = timekeeper; Season = TimeKeeper.CurrentSeason(); TflFolder = Config.TflFolder(); SetLastRunDate(); }
/// <summary> /// Execute the report /// </summary> public void Execute() { // Check the timeing if ( !OkToExecute() ) { SkipReport(); return; } // Do the report Utility.Announce( string.Format( "---- {0} --------------------------------", MyAction.Method.Name ), 0 ); var stopwatch = new Stopwatch(); stopwatch.Start(); Utility.Announce( string.Format( "{0} ...", MyAction.Method.Name ), 0 ); MyAction.Invoke(); var ts = Utility.StopTheWatch( stopwatch, string.Format( "Finished: {0}", MyAction.Method.Name ) ); Utility.Announce( "============================================", 0 ); var runStorer = new DbfRunStorer(); runStorer.StoreRun( MyAction.Method.Name, ts ); }
/// <summary> /// Execute the report /// </summary> public void Execute() { // Check the timeing if (!OkToExecute()) { SkipReport(); return; } // Do the report Utility.Announce(string.Format("---- {0} --------------------------------", MyAction.Method.Name), 0); var stopwatch = new Stopwatch(); stopwatch.Start(); Utility.Announce(string.Format("{0} ...", MyAction.Method.Name), 0); MyAction.Invoke(); var ts = Utility.StopTheWatch(stopwatch, string.Format("Finished: {0}", MyAction.Method.Name)); Utility.Announce("============================================", 0); var runStorer = new DbfRunStorer(); runStorer.StoreRun(MyAction.Method.Name, ts); }
/// <summary> /// Records the run /// </summary> public void StopRun() { var ts = Utility.StopTheWatch(Stopwatch, string.Format("Finished Job: {0}", Name)); var runStorer = new DbfRunStorer(); runStorer.StoreRun(Name, ts, "Job"); LogElapsedTime(ts); }