Пример #1
0
        public ParallelAPSIM(
            Storage.StorageCredentials storageCredentials,
            Batch.BatchCredentials batchCredentials,
            PoolSettings poolSettings)
        {
            _storageAccount = new CloudStorageAccount(
                new StorageCredentials(
                    storageCredentials.Account,
                    storageCredentials.Key),
                true);

            _batchClient = BatchClient.Open(
                new BatchSharedKeyCredentials(
                    batchCredentials.Url,
                    batchCredentials.Account,
                    batchCredentials.Key));

            _batchClient.CustomBehaviors.Add(
                RetryPolicyProvider.LinearRetryProvider(TimeSpan.FromSeconds(3), 10));

            _fileUploader       = new FileUploader(_storageAccount);
            _storageCredentials = storageCredentials;
            _batchCredentials   = batchCredentials;
            _poolSettings       = poolSettings;
        }
        public JobOutputMonitor(
            Storage.StorageCredentials storageCredentials,
            Batch.BatchCredentials batchCredentials)
        {
            _storageAccount = new CloudStorageAccount(
                new StorageCredentials(
                    storageCredentials.Account,
                    storageCredentials.Key),
                true);

            _blobClient = _storageAccount.CreateCloudBlobClient();
            _blobClient.DefaultRequestOptions.RetryPolicy = new LinearRetry(TimeSpan.FromSeconds(3), 10);

            _batchClient = BatchClient.Open(
                new BatchSharedKeyCredentials(
                    batchCredentials.Url,
                    batchCredentials.Account,
                    batchCredentials.Key));

            _batchClient.CustomBehaviors.Add(
                RetryPolicyProvider.LinearRetryProvider(TimeSpan.FromSeconds(3), 10));
        }