Esempio n. 1
0
        /// <summary>
        ///     Prepares the arguments to pass into downloader
        /// </summary>
        /// <returns>
        ///     The string of arguments built from the options
        /// </returns>
        public string PrepareDownload()
        {
            this.semaphore.Wait();
            string args = PreparationService.PrepareDownload(this, downloadTokenSource.Token);

            this.semaphore.Release();
            return(args);
        }
Esempio n. 2
0
        /// <summary>
        ///     Prepares the arguments to pass into downloader
        /// </summary>
        /// <returns>
        ///     The string of arguments built from the options
        /// </returns>
        public async Task <string> PrepareDownloadAsync()
        {
            await this.semaphore.WaitAsync();

            string args = await PreparationService.PrepareDownloadAsync(this);

            this.semaphore.Release();
            return(args);
        }
Esempio n. 3
0
        /// <summary>
        ///     Prepares the arguments to pass into downloader
        /// </summary>
        /// <returns>
        ///     The string of arguments built from the options
        /// </returns>
        public async Task <string> PrepareDownloadAsync()
        {
            await this.semaphore.WaitAsync();

            await this.UpdateExecutable();

            string args = await PreparationService.PrepareDownloadAsync(this, downloadTokenSource.Token);

            this.semaphore.Release();
            return(args);
        }
Esempio n. 4
0
        public void SelectTest()
        {
            Stopwatch sp = new Stopwatch();

            sp.Start();
            PreparationService service = new PreparationService();
            var result = service.SelectMatch().Result;

            sp.Stop();
            var time = sp.Elapsed;
        }
Esempio n. 5
0
        public void ProcessOrder(string folder)
        {
            var service = new PreparationService();
            var order   = new ProcessingOrder(folder, this);

            service.Prepare(order.OrderFiles, order.OrderDocs, order.Rule);

            if (EnableCleanup.Value)
            {
                try
                {
                    Directory.Delete(folder, true);
                }
                catch
                {
                }
            }
        }