Beispiel #1
0
        /// <summary>
        /// Sets up the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void SetUp(IHostV50 host, string config)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            TableStorage.CreateTable(config, UsersTable);
            TableStorage.CreateTable(config, UserGroupsTable);
            TableStorage.CreateTable(config, UserDataTable);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <param name="wiki">The wiki.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void Init(IHostV40 host, string config, string wiki)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            _host = host;
            _wiki = string.IsNullOrEmpty(wiki) ? "root" : wiki;

            _directory = new AzureDirectory(TableStorage.StorageAccount(config), wiki + "-searchindex");
        }
Beispiel #3
0
        /// <summary>
        /// Initializes the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <param name="wiki">The wiki.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void Init(IHostV50 host, string config, string wiki)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            _host = host;
            _wiki = string.IsNullOrEmpty(wiki) ? "root" : wiki.ToLowerInvariant();

            _cloudTableClient = TableStorage.TableClient(config);
        }
        /// <summary>
        /// Initializes the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <param name="wiki">The wiki.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void Init(IHostV40 host, string config, string wiki)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            _host = host;
            _wiki = wiki;

            _context = TableStorage.GetContext(config);

            _client = TableStorage.StorageAccount(config).CreateCloudBlobClient();
        }
        /// <summary>
        /// Sets up the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void SetUp(IHostV40 host, string config)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            TableStorage.CreateTable(config, SettingsTable);
            TableStorage.CreateTable(config, MetadataTable);
            TableStorage.CreateTable(config, RecentChangesTable);
            TableStorage.CreateTable(config, OutgoingLinksTable);
            TableStorage.CreateTable(config, AclEntriesTable);
            TableStorage.CreateTable(config, PluginsTable);
        }
        /// <summary>
        /// Initializes the Storage Provider.
        /// </summary>
        /// <param name="host">The Host of the Component.</param>
        /// <param name="config">The Configuration data, if any.</param>
        /// <param name="wiki">The wiki.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="host"/> or <paramref name="config"/> are <c>null</c>.</exception>
        /// <exception cref="InvalidConfigurationException">If <paramref name="config"/> is not valid or is incorrect.</exception>
        public void Init(IHostV40 host, string config, string wiki)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (config == "")
            {
                config = Config.GetConnectionString();
            }

            _host = host;
            _wiki = string.IsNullOrEmpty(wiki) ? "root" : wiki.ToLowerInvariant();

            _context = TableStorage.GetContext(config);

            _aclManager = new AzureTableStorageAclManager(StoreEntry, DeleteEntries, RenameAclResource, RetrieveAllAclEntries, RetrieveAclEntriesForResource, RetrieveAclEntriesForSubject);
        }