コード例 #1
0
        public void ZipIt()
        {
            WindowsEventLogger.
            WriteEventLogEntry($"Zipping File", EventLogEntryType.Information);

            _provider.ZipIt();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            try
            {
                WindowsEventLogger
                .WriteEventLogEntry("Launched Daily Job", EventLogEntryType.Information);

                Factory.Intialize();

                Factory
                .GetFileProvider()
                .CreateIt();

                Factory
                .GetCompressorProvider()
                .ZipIt();

                Factory
                .GetFtpProvider()
                .SendIt();
            }
            catch (Exception ex)
            {
                WindowsEventLogger
                .WriteEventLogEntry($"Message:  {ex.Message}  Data:  {ex.Data}", EventLogEntryType.Error);
                MessageBox.Show("CrossFit Scraper Error.  See Event Log", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        public List <Event> GetCurrentEventList()
        {
            WindowsEventLogger.WriteEventLogEntry("Getting Events...", EventLogEntryType.Information);

            return(_provider
                   .GetCurrentEventList());
        }
コード例 #4
0
        public string SendIt()
        {
            WindowsEventLogger.WriteEventLogEntry("Ftp File", EventLogEntryType.Information);
            var returnVal = _provider.SendIt();

            WindowsEventLogger.WriteEventLogEntry($"Return value:  {returnVal}", EventLogEntryType.Information);

            return(returnVal);
        }
コード例 #5
0
 public void CreateIt()
 {
     WindowsEventLogger.WriteEventLogEntry($"Write File {Factory.GetFullFileName()}", EventLogEntryType.Information);
     _provider.CreateIt();
 }
コード例 #6
0
 public string GetEventPopulateSql(List <Event> events)
 {
     WindowsEventLogger.WriteEventLogEntry("GetEventPopulateSql", EventLogEntryType.Information);
     return(_provider
            .GetEventPopulateSql(events));
 }
コード例 #7
0
 public string GetAffiliatePopulateSql(List <Affiliate> affiliateList)
 {
     WindowsEventLogger.WriteEventLogEntry("GetAffiliatePopulateSql", EventLogEntryType.Information);
     return(_provider
            .GetAffiliatePopulateSql(affiliateList));
 }
コード例 #8
0
 public List <Affiliate> GetCurrentAffiliateList()
 {
     WindowsEventLogger.WriteEventLogEntry("GetCurrentAffiliateList", EventLogEntryType.Information);
     return(_provider.GetCurrentAffiliateList());
 }