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; } }
public void TestServiceConstructor() { DataExtractServiceProcessor processor = new DataExtractServiceProcessor(); processor.Run(); }