public CloudFileClientEx(FailoverToken failoverToken, params CloudFileClient[] cloudFileClients)
        {
            if (failoverToken == null)
            {
                throw new ArgumentNullException(nameof(failoverToken));
            }

            if (cloudFileClients == null)
            {
                throw new ArgumentNullException(nameof(cloudFileClients));
            }

            if (cloudFileClients.Length == 0)
            {
                throw new ArgumentException(nameof(cloudFileClients));
            }

            if (failoverToken.FailoverCount != cloudFileClients.Length)
            {
                throw new ArgumentException();
            }


            this.failoverContainer = new FailoverContainer <CloudFileClient>(failoverToken, cloudFileClients);
        }
        public FailoverContainer(FailoverToken failoverToken, params T[] array)
        {
            if (failoverToken == null)
            {
                throw new ArgumentNullException(nameof(failoverToken));
            }

            if (array == null)
            {
                throw new ArgumentNullException(nameof(array));
            }

            if (array.Length == 0)
            {
                throw new ArgumentException(nameof(array));
            }

            if (failoverToken.FailoverCount != array.Length)
            {
                throw new ArgumentException();
            }


            this.failoverToken = failoverToken;
            this.array         = array;
        }
        public CloudStorageAccountEx(params CloudStorageAccount[] accounts)
        {
            if (accounts == null)
            {
                throw new ArgumentNullException(nameof(accounts));
            }

            if (accounts.Length == 0)
            {
                throw new ArgumentException(nameof(accounts));
            }


            FailoverToken failoverToken = new FailoverToken(accounts.Length);

            this.failoverContainer = new FailoverContainer <CloudStorageAccount>(failoverToken, accounts);
        }
Ejemplo n.º 4
0
 public CloudBlobContainerEx(CloudBlobClientEx cloudBlobClient, FailoverToken failoverToken, params CloudBlobContainer[] cloudBlobContainers)
     : this(cloudBlobClient, new FailoverContainer <CloudBlobContainer>(failoverToken, cloudBlobContainers))
 {
 }
 public CloudAppendBlobEx(CloudBlobContainerEx cloudBlobContainer, FailoverToken failoverToken, params CloudAppendBlob[] cloudAppendBlobs)
     : this(cloudBlobContainer, new FailoverContainer <CloudAppendBlob>(failoverToken, cloudAppendBlobs))
 {
 }
Ejemplo n.º 6
0
 public CloudBlobDirectoryEx(CloudBlobContainerEx cloudBlobContainer, FailoverToken failoverToken, params CloudBlobDirectory[] cloudBlobs)
     : this(cloudBlobContainer, new FailoverContainer <CloudBlobDirectory>(failoverToken, cloudBlobs))
 {
 }