public async Task <bool> AreWeFileHandling(Document document) { if (!BittrexFileUploadState.Waiting) { return(false); } _log.LogInformation($"Am I waiting for the file? = {BittrexFileUploadState.Waiting}"); if (document == null) { await _bus.SendAsync(new SendMessageCommand("Did not receive a file")); BittrexFileUploadState.Reset(); return(true); } await _bus.SendAsync(new BittrexTradeExportCommand(document.FileId)); BittrexFileUploadState.Reset(); return(true); }
public async Task <bool> AreWeFileHandling(Document document) { if (!BittrexFileUploadState.Waiting) { return(false); } _log.LogInformation($"Am I waiting for the file? = {BittrexFileUploadState.Waiting}"); if (document == null) { var message = new StringBuffer(); message.Append(StringContants.DidNotReceiveFile); await _bus.SendAsync(new SendMessageCommand(message)); BittrexFileUploadState.Reset(); return(true); } await _bus.SendAsync(new BittrexTradeExportCommand(document.FileId)); BittrexFileUploadState.Reset(); return(true); }