Ejemplo n.º 1
0
 private TestContext(IIndexedBlobStoreClient client, CloudStorageAccount storageAccount, IndexedBlobFileSystemCache cache, IndexedBlobLocalCacheSettings cacheSettings)
 {
     Client         = client;
     StorageAccount = storageAccount;
     Cache          = cache;
     CacheSettings  = cacheSettings;
 }
Ejemplo n.º 2
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
            };
        }