Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
using System.Linq;
using System.Security.Cryptography;
using System.Threading.Tasks;
using Azure.Core.Pipeline;
using System.Net.Http;

namespace Microsoft.DotNet.Build.CloudTestTasks
{
Expand All @@ -35,11 +37,17 @@ public class AzureStorageUtils

public BlobContainerClient Container { get; set; }

private static readonly HttpClient s_httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(300) };
private static readonly BlobClientOptions s_clientOptions = new BlobClientOptions()
{
Transport = new HttpClientTransport(s_httpClient)
};

public AzureStorageUtils(string AccountName, string AccountKey, string ContainerName)
{
_credential = new StorageSharedKeyCredential(AccountName, AccountKey);
Uri endpoint = new Uri($"https://{AccountName}.blob.core.windows.net");
BlobServiceClient service = new BlobServiceClient(endpoint, _credential);
BlobServiceClient service = new BlobServiceClient(endpoint, _credential, s_clientOptions);
Container = service.GetBlobContainerClient(ContainerName);
}

Expand Down