예제 #1
0
        static void Main(string[] args)
        {
            try
            {
                ApplicationLogger.ClearLogFile();
                ApplicationLogger.ClearErrorFile();
                ApplicationLogger.WriteStringToLog("Application started.");

                LibraryData booksSources = new LibraryData();
                if (booksSources.NewBooksAreAvailable)
                {
                    LibraryUpdater booksUpload = new LibraryUpdater(booksSources.LastBookIdFromDatabase);
                }
                ApplicationLogger.WriteStringToLog("Application finished.");
            }
            catch (ApplicationException ex)
            {
                Console.WriteLine("Application finished work with error. Please see error file.");
                ApplicationLogger.WriteStringToError(ex.Message);
                ApplicationLogger.WriteStringToLog("Application finished work with error. Please see error file.");
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: avgx/knigoskop
        static void Main(string[] args)
        {
            try
            {
                ApplicationLogger.ClearLogFile();
                ApplicationLogger.ClearErrorFile();
                ApplicationLogger.WriteStringToLog("Application started.");

                LibraryData booksSources = new LibraryData();
                if (booksSources.NewBooksAreAvailable)
                {
                    LibraryUpdater booksUpload= new LibraryUpdater(booksSources.LastBookIdFromDatabase);
                }
                ApplicationLogger.WriteStringToLog("Application finished.");
            }
            catch (ApplicationException ex)
            {
                Console.WriteLine("Application finished work with error. Please see error file.");
                ApplicationLogger.WriteStringToError(ex.Message);
                ApplicationLogger.WriteStringToLog("Application finished work with error. Please see error file.");
            }
        }