Esempio n. 1
0
        private void VerifyEnvironmentVariables()
        {
            if (String.IsNullOrEmpty(Username))
            {
                throw new ConfigurationException("invalid username");
            }

            if (String.IsNullOrEmpty(Password))
            {
                throw new ConfigurationException("invalid password");
            }

            if (Buckets == null ||
                Buckets.Count == 0 ||
                !Buckets.Exists(bucket => !String.IsNullOrEmpty(bucket)))
            {
                throw new ConfigurationException("bucket list cannot be null or empty");
            }

            if (String.IsNullOrEmpty(PortfolioBucketName))
            {
                throw new ConfigurationException("invalid portfolio bucket name");
            }

            if (String.IsNullOrEmpty(AccountBucketName))
            {
                throw new ConfigurationException("invalid account bucket name");
            }

            if (String.IsNullOrEmpty(UserBucketName))
            {
                throw new ConfigurationException("invalid user bucket name");
            }

            if (ServerUris == null || ServerUris.Count == 0)
            {
                throw new ConfigurationException("server list cannot be null or empty");
            }
        }