public async void StartAccessAsync(CancellationToken cancellationToken) { var e = dbAccess.StartDbAsync(cancellationToken); e.Wait(); if (cancellationToken.IsCancellationRequested) { return; } XmlGeneratorService xmlData = new XmlGeneratorService(); resultOutput = await xmlData.CreateContentAsync(await dbAccess.GetAddAsync("GETALLADDRESS", cancellationToken), cancellationToken); if (cancellationToken.IsCancellationRequested) { return; } FileTransferService fts = new FileTransferService(resultOutput); await fts.LogContentAsync(cancellationToken); if (cancellationToken.IsCancellationRequested) { return; } Thread.Sleep(10000); }
public void StartAccess() { dbAccess.StartDb(); XmlGeneratorService xmlData = new XmlGeneratorService(); resultOutput = xmlData.CreateContent(dbAccess.GetAdd("GETALLADDRESS")); FileTransferService fts = new FileTransferService(resultOutput); fts.LogContent(); Thread.Sleep(10000); }