Ejemplo n.º 1
0
        public void Test_Success()
        {
            DataExtractServiceProcessor _processor = new DataExtractServiceProcessor();
            var response = _processor.Run();

            while (!response.IsCompleted)
            {
                ;
            }
        }
 private void TimerElapsedHandler(object sender, ElapsedEventArgs eventArguments)
 {
     _timer.Enabled = false;
     try
     {
         LogWrapper.Log($"Timer Elapsed event triggered. Running data extract processor at : {eventArguments.SignalTime} ", $"Thread id: {System.Threading.Thread.CurrentThread.ManagedThreadId}", 1, System.Diagnostics.TraceEventType.Information);
         IDataExtractProcessor backGroundProcessor = new DataExtractServiceProcessor();
         backGroundProcessor.Run();
         LogWrapper.Log($"Data Extract processor completed", $"Thread id: {System.Threading.Thread.CurrentThread.ManagedThreadId}", 1, System.Diagnostics.TraceEventType.Information);
     }
     catch (Exception ex)
     {
         LogWrapper.Log($"Error occurred in calling data extract method. Error message : {ex.Message}", $"Thread id: {System.Threading.Thread.CurrentThread.ManagedThreadId}", 1, System.Diagnostics.TraceEventType.Information);
     }
     finally
     {
         _timer.Enabled = true;
     }
 }
Ejemplo n.º 3
0
        public void TestServiceConstructor()
        {
            DataExtractServiceProcessor processor = new DataExtractServiceProcessor();

            processor.Run();
        }