Esempio n. 1
0
        public void Init()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudBlobClient();

            _store = new AzureStore(client, false, null); // Do not snapshot and do tracing!
            _store.CreateContainerIfNotExists("testindexer");

            var store = new SecureStore(_store);

            _indexer = new LuceneIndex(store, "testindexer", "basePath", null);
        }
Esempio n. 2
0
        public void Init()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudBlobClient();
            _store = new AzureStore(client, false, null); // Do not snapshot and do tracing!
            _store.CreateContainerIfNotExists("testindexer");

            // Use a file based cache for tests (more common use case)
            _tempDir = IO.Path.Combine(IO.Path.GetTempPath(), IO.Path.GetFileNameWithoutExtension(IO.Path.GetRandomFileName()));
            IO.Directory.CreateDirectory(_tempDir);

            var store = new SecureStore(_store);
            _indexer = new LuceneIndex(store, "testindexer", "basePath", null, _tempDir);
        }
Esempio n. 3
0
 /// <summary>
 /// Make sure a container exists
 /// </summary>
 /// <param name="container">Name of the container to create</param>
 public Task CreateContainerIfNotExists(string container)
 {
     return(_store.CreateContainerIfNotExists(container));
 }