Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions libraries/Microsoft.Bot.Builder.Azure/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Runtime.CompilerServices;

// Allows us to access some internal methods from the Microsoft.Bot.Builder.Azure.Tests unit tests so we don't have to use reflection and we get compile checks.
#if SIGNASSEMBLY
[assembly: InternalsVisibleTo("Microsoft.Bot.Builder.Azure.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
#else
[assembly: InternalsVisibleTo("Microsoft.Bot.Builder.Azure.Tests")]
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class AzureBlobTranscriptStore : ITranscriptStore

private static HashSet<string> _checkedContainers = new HashSet<string>();

private readonly CloudBlobClient _blobClient;

/// <summary>
/// Initializes a new instance of the <see cref="AzureBlobTranscriptStore"/> class.
/// Creates an instance of AzureBlobTranscriptStore.
Expand Down Expand Up @@ -63,7 +65,7 @@ public AzureBlobTranscriptStore(CloudStorageAccount storageAccount, string conta
() =>
{
containerName = containerName.ToLowerInvariant();
var blobClient = storageAccount.CreateCloudBlobClient();
var blobClient = _blobClient ?? storageAccount.CreateCloudBlobClient();
NameValidator.ValidateContainerName(containerName);
var container = blobClient.GetContainerReference(containerName);
if (!_checkedContainers.Contains(containerName))
Expand All @@ -76,6 +78,19 @@ public AzureBlobTranscriptStore(CloudStorageAccount storageAccount, string conta
}, isThreadSafe: true);
}

/// <summary>
/// Initializes a new instance of the <see cref="AzureBlobTranscriptStore"/> class.
/// Creates an instance of AzureBlobTranscriptStore.
/// </summary>
/// <param name="storageAccount">.</param>
/// <param name="containerName">Name of the container where transcript blobs will be stored.</param>
/// <param name="blobClient">Custom implementation of CloudBlobClient.</param>
internal AzureBlobTranscriptStore(CloudStorageAccount storageAccount, string containerName, CloudBlobClient blobClient)
: this(storageAccount, containerName)
{
_blobClient = blobClient;
}

private Lazy<CloudBlobContainer> Container { get; set; }

/// <summary>
Expand Down
Loading