Skip to content

Commit

Permalink
Changes based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
microposmp committed Oct 7, 2024
1 parent a9a8b19 commit 82212ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@
namespace OrchardCore.DataProtection.Azure;

/// <summary>
/// Represents tenant event that deletes data protection blob from a container when a tenant is deleted.
/// A tenant event that deletes data protection blobs from a container when a tenant is deleted.
/// </summary>
public class BlobModularTenantEvents : ModularTenantEvents
{
private readonly BlobOptions _blobOptions;
private readonly ILogger<BlobModularTenantEvents> _logger;

/// <summary>
/// Creates a new instance of the <see cref="BlobModularTenantEvents"/>.
/// </summary>
/// <param name="blobOptions">The <see cref="BlobOptions"/></param>
/// <param name="logger">The <see cref="ILogger"/></param>
public BlobModularTenantEvents(
BlobOptions blobOptions,
ILogger<BlobModularTenantEvents> logger)
Expand All @@ -30,7 +25,6 @@ public BlobModularTenantEvents(
/// Removes the data protection blob from the container when a tenant is deleted.
/// </summary>
/// <param name="context">The <see cref="ShellRemovingContext"/></param>
/// <returns></returns>
public async override Task RemovingAsync(ShellRemovingContext context)
{
var blobClient = new BlobClient(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public override void ConfigureServices(IServiceCollection services)
options.ContainerName,
options.BlobName);
});

services.AddSingleton<IModularTenantEvents, BlobModularTenantEvents>();
}
else
{
_logger.LogCritical("No connection string was supplied for OrchardCore.DataProtection.Azure. Ensure that an application setting containing a valid Azure Storage connection string is available at `Modules:OrchardCore.DataProtection.Azure:ConnectionString`.");
}

services.AddSingleton<IModularTenantEvents, BlobModularTenantEvents>();
}
}

0 comments on commit 82212ae

Please sign in to comment.