@@ -10,28 +10,29 @@ namespace Umbraco.Cloud.StorageProviders.AzureBlob
1010 /// Automatically configures Azure Blob Storage for use on Umbraco Cloud.
1111 /// </summary>
1212 /// <seealso cref="Umbraco.Cms.Core.Composing.IComposer" />
13- public class AzureBlobComposer : IComposer
13+ public sealed class AzureBlobComposer : IComposer
1414 {
1515 /// <inheritdoc />
1616 public void Compose ( IUmbracoBuilder builder )
1717 {
18- if ( builder == null ) throw new ArgumentNullException ( nameof ( builder ) ) ;
18+ ArgumentNullException . ThrowIfNull ( builder ) ;
1919
20- /* There's a bug in Microsoft.Extensions.Configuration.EnvironmentVariables @ 6.0.0 WRT env var normalization + AddEnvironmentVariables(prefix)
21- * See https://github.com/dotnet/runtime/pull/62916, should be resolved upstream in https://github.com/dotnet/runtime/milestone/87
22- * Until then, safest thing to do is explicitly add environment variables using both prefixes.
23- * (otherwise there are issues when folks update TFM to net6) */
2420 var configuration = new ConfigurationBuilder ( )
2521 . AddEnvironmentVariables ( "Umbraco:Cloud:" )
26- . AddEnvironmentVariables ( "Umbraco__Cloud__" )
2722 . Build ( ) ;
2823
2924 // Get options and manually validate (no need to add them to the service collection)
3025 var azureBlobOptions = configuration . GetSection ( "Storage:AzureBlob" ) . Get < AzureBlobOptions > ( ) ;
31- if ( azureBlobOptions == null ) return ;
26+ if ( azureBlobOptions == null )
27+ {
28+ return ;
29+ }
3230
3331 var validateResult = new DataAnnotationValidateOptions < AzureBlobOptions > ( null ) . Validate ( null , azureBlobOptions ) ;
34- if ( validateResult . Failed ) return ;
32+ if ( validateResult . Failed )
33+ {
34+ return ;
35+ }
3536
3637 // Configure Azure Blob Storage
3738 builder . AddAzureBlobMediaFileSystem ( options =>
0 commit comments