/// <summary>
        /// Executes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public override void Execute(PluginContext context)
        {
            try
            {
                var generator = new ReportGenerator();
                Report report = ReportRepository.Instance.GetDailyActivityReport();

                string reportName = string.Format("{0}_{1:MMM}_{1:yyyy}.xlsx", _reportName, DateTime.Now);

                Log.DebugFormat("Creating {0} at {1}", reportName, _reportPath);

                string reportPath = Path.Combine(_reportPath, reportName);

                InitializePath(_reportPath);

                generator.GenerateReport(reportPath, string.Format("{0}_{1:MM_dd_yyyy}", _worksheet, DateTime.Now), report, true, true);

                SendReport(reportPath);

                Log.DebugFormat("GenerateManagementReport Job ended @ {0}", DateTime.Now);
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }
        }
Ejemplo n.º 2
0
 public override void Execute(PluginContext context)
 {
     Debug.WriteLine("Inside TestPlugin.Execute");
 }