Esempio n. 1
0
        public void AddStorage(string path, string connectionString)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            if (String.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException(nameof(connectionString));
            }

            string name = path.Trim(PATH_SEPARATORS);

            if (name == "")
            {
                throw new ArgumentException(nameof(name));
            }

            CheckValidMountPath(name);

            AzureBlobAccount azureBlobAccount = new AzureBlobAccount(this, name, connectionString);

            string key = name + '/';

            _storageAccounts.Add(key, azureBlobAccount);
        }
Esempio n. 2
0
        string GetBlobPath(AzureBlobAccount account, string path)
        {
            if (path == account.Name)
            {
                return("");
            }

            return(path.Substring(account.Name.Length + 1));
        }