Esempio n. 1
0
        private IEnumerable <FullBackup.StorageEnvironmentInformation> GetAllStoragesEnvironmentInformation()
        {
            yield return(new FullBackup.StorageEnvironmentInformation()
            {
                Name = "",
                Folder = "Subscriptions",
                Env = SubscriptionStorage.Environment()
            });

            var i = 1;

            foreach (var index in IndexStore.GetIndexes())
            {
                var env = index._indexStorage.Environment();
                if (env != null)
                {
                    yield return(new FullBackup.StorageEnvironmentInformation()
                    {
                        Name = i++.ToString(),
                        Folder = "Indexes",
                        Env = env
                    });
                }
            }
            yield return(new FullBackup.StorageEnvironmentInformation()
            {
                Name = "",
                Folder = "",
                Env = DocumentsStorage.Environment
            });
        }
Esempio n. 2
0
        public IEnumerable <StorageEnvironmentWithType> GetAllStoragesEnvironment()
        {
            // TODO :: more storage environments ?
            yield return(new StorageEnvironmentWithType(Name, StorageEnvironmentWithType.StorageEnvironmentType.Documents, DocumentsStorage.Environment));

            yield return(new StorageEnvironmentWithType("Subscriptions", StorageEnvironmentWithType.StorageEnvironmentType.Subscriptions, SubscriptionStorage.Environment()));

            yield return(new StorageEnvironmentWithType("Configuration", StorageEnvironmentWithType.StorageEnvironmentType.Configuration, ConfigurationStorage.Environment));

            foreach (var index in IndexStore.GetIndexes())
            {
                var env = index._indexStorage?.Environment();
                if (env != null)
                {
                    yield return(new StorageEnvironmentWithType(index.Name, StorageEnvironmentWithType.StorageEnvironmentType.Index, env));
                }
            }
        }