Skip to content

Commit db05840

Browse files
Copilotsebastienros
andcommitted
Simplify connection string parsing in AzureBlobStorageContainerSettings
Co-authored-by: sebastienros <1165805+sebastienros@users.noreply.github.com>
1 parent 6c023f5 commit db05840

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/Components/Aspire.Azure.Storage.Blobs/AzureBlobStorageContainerSettings.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ void IConnectionStringSettings.ParseConnectionString(string? connectionString)
3232
DbConnectionStringBuilder builder = new() { ConnectionString = connectionString };
3333
if (builder.TryGetValue(Endpoint, out var endpoint) && builder.TryGetValue(ContainerName, out var containerName))
3434
{
35-
// Remove any quotes around the endpoint value
36-
string endpointStr = endpoint?.ToString() ?? string.Empty;
37-
if (endpointStr.StartsWith("\"") && endpointStr.EndsWith("\"") && endpointStr.Length >= 2)
38-
{
39-
endpointStr = endpointStr.Substring(1, endpointStr.Length - 2);
40-
}
41-
42-
ConnectionString = endpointStr;
35+
ConnectionString = endpoint?.ToString();
4336
BlobContainerName = containerName?.ToString();
4437
}
4538
}

0 commit comments

Comments
 (0)