Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }