Асинхронное программирование async и await
он не возвращает никакого значения
Severity Code Description Project File Line Suppression State Warning CS4014 Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
Что я уже пробовал:
/* This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...). */ public async void ProcessRequests(object sender, ElapsedEventArgs args) { timeDelay2.Stop(); string ID = DateTime.Now.ToString("yyyyMMddhhmmss"); try { if (disableService == "N") { var Requests = GetTransactions(ID); if (Requests != null) { int totalRows = Requests.Count; if (totalRows > 0) { logger.Info(" ID : " + ID + " | New Reprocessing Session Started... "); Parallel.ForEach(Requests, row => { //the error is at this point ReprocessFailedTopUp(ID, row); } ); logger.Info(" ID : " + ID + " | Transactions Processed : " + totalRows.ToString("N0")); } } } } catch (Exception exc) { logger.Error("ID : " + ID + " | Exception Occurred in Current Session | Exception : " + exc.Message); } timeDelay2.Start(); }