diff --git a/Directory.Packages.props b/Directory.Packages.props index 823479418a..4a56423744 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -98,6 +98,7 @@ + diff --git a/src/Microsoft.Health.Dicom.Blob/Constants.cs b/src/Microsoft.Health.Dicom.Blob/BlobConstants.cs similarity index 85% rename from src/Microsoft.Health.Dicom.Blob/Constants.cs rename to src/Microsoft.Health.Dicom.Blob/BlobConstants.cs index b40049215d..a9fcb5e467 100644 --- a/src/Microsoft.Health.Dicom.Blob/Constants.cs +++ b/src/Microsoft.Health.Dicom.Blob/BlobConstants.cs @@ -1,11 +1,11 @@ -// ------------------------------------------------------------------------------------------------- +// ------------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------------------------------------------- namespace Microsoft.Health.Dicom.Blob; -public static class Constants +public static class BlobConstants { public const string BlobStoreConfigurationSection = "DicomWeb:DicomStore"; public const string BlobContainerConfigurationName = "dicomBlob"; diff --git a/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobMetadataStore.cs b/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobMetadataStore.cs index 7e93efcfb8..1fc41b5e3a 100644 --- a/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobMetadataStore.cs +++ b/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobMetadataStore.cs @@ -62,7 +62,7 @@ public BlobMetadataStore( _blobRetrieveMeter = EnsureArg.IsNotNull(blobRetrieveMeter, nameof(blobRetrieveMeter)); BlobContainerConfiguration containerConfiguration = namedBlobContainerConfigurationAccessor - .Get(Constants.MetadataContainerConfigurationName); + .Get(BlobConstants.MetadataContainerConfigurationName); _container = client.GetBlobContainerClient(containerConfiguration.ContainerName); } diff --git a/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobWorkitemStore.cs b/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobWorkitemStore.cs index 22ccf9931c..9498aab6df 100644 --- a/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobWorkitemStore.cs +++ b/src/Microsoft.Health.Dicom.Blob/Features/Storage/BlobWorkitemStore.cs @@ -51,7 +51,7 @@ public BlobWorkitemStore( _logger = EnsureArg.IsNotNull(logger, nameof(logger)); var containerConfiguration = namedBlobContainerConfigurationAccessor - .Get(Constants.WorkitemContainerConfigurationName); + .Get(BlobConstants.WorkitemContainerConfigurationName); _container = client.GetBlobContainerClient(containerConfiguration.ContainerName); } diff --git a/src/Microsoft.Health.Dicom.Blob/Features/Storage/InternalBlobClient.cs b/src/Microsoft.Health.Dicom.Blob/Features/Storage/InternalBlobClient.cs index 1b716bd508..fa937e036b 100644 --- a/src/Microsoft.Health.Dicom.Blob/Features/Storage/InternalBlobClient.cs +++ b/src/Microsoft.Health.Dicom.Blob/Features/Storage/InternalBlobClient.cs @@ -28,7 +28,7 @@ public InternalBlobClient( ILogger logger) { _client = EnsureArg.IsNotNull(blobServiceClient, nameof(blobServiceClient)); - _containerName = EnsureArg.IsNotNull(optionsMonitor.Get(Constants.BlobContainerConfigurationName).ContainerName, nameof(optionsMonitor)); + _containerName = EnsureArg.IsNotNull(optionsMonitor.Get(BlobConstants.BlobContainerConfigurationName).ContainerName, nameof(optionsMonitor)); _logger = EnsureArg.IsNotNull(logger, nameof(logger)); _logger.LogInformation("Internal blob client registered."); } diff --git a/src/Microsoft.Health.Dicom.Blob/Registration/DicomFunctionBuilderMetadataRegistrationExtensions.cs b/src/Microsoft.Health.Dicom.Blob/Registration/DicomFunctionBuilderMetadataRegistrationExtensions.cs index 18d5b783df..23df123d4e 100644 --- a/src/Microsoft.Health.Dicom.Blob/Registration/DicomFunctionBuilderMetadataRegistrationExtensions.cs +++ b/src/Microsoft.Health.Dicom.Blob/Registration/DicomFunctionBuilderMetadataRegistrationExtensions.cs @@ -55,7 +55,7 @@ public static IDicomFunctionsBuilder AddBlobStorage( .AddTransient(sp => sp.GetRequiredService()) .AddPersistence() .AddScoped() - .AddOptions(Constants.MetadataContainerConfigurationName) + .AddOptions(BlobConstants.MetadataContainerConfigurationName) .Configure>((c, o) => c.ContainerName = o.CurrentValue.Metadata); // Blob Files @@ -86,7 +86,7 @@ public static IDicomFunctionsBuilder AddBlobStorage( .AddSingleton() .AddTransient(sp => sp.GetRequiredService()) .AddPersistence() - .AddOptions(Constants.BlobContainerConfigurationName) + .AddOptions(BlobConstants.BlobContainerConfigurationName) .Configure>((c, o) => c.ContainerName = o.CurrentValue.File); } diff --git a/src/Microsoft.Health.Dicom.Blob/Utilities/StoreConfigurationSection.cs b/src/Microsoft.Health.Dicom.Blob/Utilities/StoreConfigurationSection.cs index 6c40075077..ed93ac7189 100644 --- a/src/Microsoft.Health.Dicom.Blob/Utilities/StoreConfigurationSection.cs +++ b/src/Microsoft.Health.Dicom.Blob/Utilities/StoreConfigurationSection.cs @@ -11,7 +11,7 @@ namespace Microsoft.Health.Dicom.Blob.Utilities; internal sealed class BlobStoreConfigurationSection : StoreConfigurationSection { public BlobStoreConfigurationSection() - : base(Constants.BlobStoreConfigurationSection, Constants.BlobContainerConfigurationName) + : base(BlobConstants.BlobStoreConfigurationSection, BlobConstants.BlobContainerConfigurationName) { } } @@ -22,7 +22,7 @@ public BlobStoreConfigurationSection() internal sealed class MetadataStoreConfigurationSection : StoreConfigurationSection { public MetadataStoreConfigurationSection() - : base(Constants.MetadataStoreConfigurationSection, Constants.MetadataContainerConfigurationName) + : base(BlobConstants.MetadataStoreConfigurationSection, BlobConstants.MetadataContainerConfigurationName) { } } @@ -33,7 +33,7 @@ public MetadataStoreConfigurationSection() internal sealed class WorkitemStoreConfigurationSection : StoreConfigurationSection { public WorkitemStoreConfigurationSection() - : base(Constants.WorkitemStoreConfigurationSection, Constants.WorkitemContainerConfigurationName) + : base(BlobConstants.WorkitemStoreConfigurationSection, BlobConstants.WorkitemContainerConfigurationName) { } } diff --git a/src/Microsoft.Health.Dicom.Core.UnitTests/Microsoft.Health.Dicom.Core.UnitTests.csproj b/src/Microsoft.Health.Dicom.Core.UnitTests/Microsoft.Health.Dicom.Core.UnitTests.csproj index 2d3e71a00f..da18dd38b0 100644 --- a/src/Microsoft.Health.Dicom.Core.UnitTests/Microsoft.Health.Dicom.Core.UnitTests.csproj +++ b/src/Microsoft.Health.Dicom.Core.UnitTests/Microsoft.Health.Dicom.Core.UnitTests.csproj @@ -24,6 +24,7 @@ + diff --git a/src/Microsoft.Health.Dicom.Core/Microsoft.Health.Dicom.Core.csproj b/src/Microsoft.Health.Dicom.Core/Microsoft.Health.Dicom.Core.csproj index c5ab4fd453..2253d421a3 100644 --- a/src/Microsoft.Health.Dicom.Core/Microsoft.Health.Dicom.Core.csproj +++ b/src/Microsoft.Health.Dicom.Core/Microsoft.Health.Dicom.Core.csproj @@ -1,4 +1,4 @@ - + Common primitives and utilities used by Microsoft's DICOMweb APIs. @@ -32,6 +32,7 @@ + diff --git a/test/Microsoft.Health.Dicom.Tests.Integration/Persistence/DataStoreTestsFixture.cs b/test/Microsoft.Health.Dicom.Tests.Integration/Persistence/DataStoreTestsFixture.cs index bab4bcc1fe..3b46fdddfa 100644 --- a/test/Microsoft.Health.Dicom.Tests.Integration/Persistence/DataStoreTestsFixture.cs +++ b/test/Microsoft.Health.Dicom.Tests.Integration/Persistence/DataStoreTestsFixture.cs @@ -70,8 +70,8 @@ public DataStoreTestsFixture() public async Task InitializeAsync() { IOptionsMonitor optionsMonitor = Substitute.For>(); - optionsMonitor.Get(Constants.BlobContainerConfigurationName).Returns(_blobContainerConfiguration); - optionsMonitor.Get(Constants.MetadataContainerConfigurationName).Returns(_metadataContainerConfiguration); + optionsMonitor.Get(BlobConstants.BlobContainerConfigurationName).Returns(_blobContainerConfiguration); + optionsMonitor.Get(BlobConstants.MetadataContainerConfigurationName).Returns(_metadataContainerConfiguration); _blobClient = BlobClientFactory.Create(_blobDataStoreConfiguration);