コード例 #1
0
ファイル: Vault.cs プロジェクト: benjaminc/AmazonGlacierSync
        public void endLoad(Func<bool> keepRunning)
        {
            if (job == null)
            {
                throw new InvalidOperationException("You must call beginLoad before calling endLoad");
            }

            if (!loadedFromFile && !loadedFromServer)
            {
                while (keepRunning() && !loadedFromServer)
                {
                    try
                    {
                        Thread.Sleep(1000);
                    }
                    catch
                    {
                    }
                }
            }

            job = null;
        }
コード例 #2
0
ファイル: Vault.cs プロジェクト: benjaminc/AmazonGlacierSync
        public void beginLoad(VaultContext context, Func<bool> keepRunning)
        {
            if (job != null)
            {
                throw new InvalidOperationException("You cannot call beginLoad twice without calling endLoad in between");
            }

            job = new InventoryRetrievalJob(context.Mapping, keepRunning);
            job.run();
        }