Пример #1
0
 private TestContext(IIndexedBlobStoreClient client, CloudStorageAccount storageAccount, IndexedBlobFileSystemCache cache, IndexedBlobLocalCacheSettings cacheSettings)
 {
     Client         = client;
     StorageAccount = storageAccount;
     Cache          = cache;
     CacheSettings  = cacheSettings;
 }
        public IIndexedBlobStoreClient Create(string storeName, IndexedBlobLocalCacheSettings cacheSettings = null)
        {
            if (cacheSettings == null)
            {
                cacheSettings = new IndexedBlobLocalCacheSettings();
            }

            return(Create(storeName, new IndexedBlobFileSystemCache(cacheSettings)));
        }
Пример #3
0
        public static void Setup(CloudStorageAccount storageAccount = null)
        {
            if (storageAccount == null)
            {
                storageAccount = CloudStorageAccount.DevelopmentStorageAccount;
            }
            var storeName = "test" + Guid.NewGuid().ToString("N");

            var factory       = new IndexedBlobStoreFactory(storageAccount);
            var cacheSettings = new IndexedBlobLocalCacheSettings();
            var cache         = new IndexedBlobFileSystemCache(cacheSettings);

            var client = factory.Create(storeName, cache);

            Current = new TestContext(client, storageAccount, cache, cacheSettings)
            {
                StoreName = storeName
            };
        }