Skip to content

Commit

Permalink
Rename IDeferredShellContextReleaseService to IShellReleaseManager
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek committed Apr 30, 2024
1 parent 8790360 commit 04087a0
Show file tree
Hide file tree
Showing 27 changed files with 101 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace OrchardCore.Azure.Email.Drivers;

public class AzureEmailSettingsDisplayDriver : SectionDisplayDriver<ISite, AzureEmailSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
Expand All @@ -33,14 +33,14 @@ public class AzureEmailSettingsDisplayDriver : SectionDisplayDriver<ISite, Azure
protected IStringLocalizer S;

public AzureEmailSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IEmailAddressValidator emailValidator,
IStringLocalizer<AzureEmailSettingsDisplayDriver> stringLocalizer)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_httpContextAccessor = httpContextAccessor;
_authorizationService = authorizationService;
_dataProtectionProvider = dataProtectionProvider;
Expand Down Expand Up @@ -147,7 +147,7 @@ public override async Task<IDisplayResult> UpdateAsync(ISite site, AzureEmailSet

if (hasChanges)
{
_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SmtpSettingsDisplayDriver : SectionDisplayDriver<ISite, SmtpSetting
[Obsolete("This property should no longer be used. Instead use EmailSettings.GroupId")]
public const string GroupId = EmailSettings.GroupId;

private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly SmtpOptions _smtpOptions;
Expand All @@ -35,15 +35,15 @@ public class SmtpSettingsDisplayDriver : SectionDisplayDriver<ISite, SmtpSetting
protected readonly IStringLocalizer S;

public SmtpSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
IOptions<SmtpOptions> options,
IAuthorizationService authorizationService,
IEmailAddressValidator emailAddressValidator,
IStringLocalizer<SmtpSettingsDisplayDriver> stringLocalizer)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_dataProtectionProvider = dataProtectionProvider;
_httpContextAccessor = httpContextAccessor;
_smtpOptions = options.Value;
Expand Down Expand Up @@ -197,7 +197,7 @@ public override async Task<IDisplayResult> UpdateAsync(ISite site, SmtpSettings

if (hasChanges)
{
_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class EmailSettingsDisplayDriver : SectionDisplayDriver<ISite, EmailSetti
private readonly IAuthorizationService _authorizationService;
private readonly EmailOptions _emailOptions;
private readonly IEmailProviderResolver _emailProviderResolver;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly EmailProviderOptions _emailProviders;

protected readonly IStringLocalizer S;
Expand All @@ -35,15 +35,15 @@ public class EmailSettingsDisplayDriver : SectionDisplayDriver<ISite, EmailSetti
IOptions<EmailProviderOptions> emailProviders,
IOptions<EmailOptions> emailOptions,
IEmailProviderResolver emailProviderResolver,
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IStringLocalizer<EmailSettingsDisplayDriver> stringLocalizer)
{
_httpContextAccessor = httpContextAccessor;
_authorizationService = authorizationService;
_emailOptions = emailOptions.Value;
_emailProviderResolver = emailProviderResolver;
_emailProviders = emailProviders.Value;
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
S = stringLocalizer;
}
public override async Task<IDisplayResult> EditAsync(EmailSettings settings, BuildEditorContext context)
Expand Down Expand Up @@ -88,7 +88,7 @@ public override async Task<IDisplayResult> UpdateAsync(EmailSettings settings, U
{
settings.DefaultProviderName = model.DefaultProvider;

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ namespace OrchardCore.Facebook.Drivers
{
public class FacebookSettingsDisplayDriver : SectionDisplayDriver<ISite, FacebookSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public FacebookSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
ILogger<FacebookSettingsDisplayDriver> logger
)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_dataProtectionProvider = dataProtectionProvider;
_httpContextAccessor = httpContextAccessor;
Expand Down Expand Up @@ -100,7 +100,7 @@ public override async Task<IDisplayResult> UpdateAsync(FacebookSettings settings
settings.AppSecret = protector.Protect(model.AppSecret);
}

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ namespace OrchardCore.Facebook.Login.Drivers
{
public class FacebookLoginSettingsDisplayDriver : SectionDisplayDriver<ISite, FacebookLoginSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;

public FacebookLoginSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IHttpContextAccessor httpContextAccessor)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_httpContextAccessor = httpContextAccessor;
}
Expand Down Expand Up @@ -59,7 +59,7 @@ public override async Task<IDisplayResult> UpdateAsync(FacebookLoginSettings set
settings.CallbackPath = model.CallbackPath;
settings.SaveTokens = model.SaveTokens;

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ namespace OrchardCore.GitHub.Drivers
{
public class GitHubAuthenticationSettingsDisplayDriver : SectionDisplayDriver<ISite, GitHubAuthenticationSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public GitHubAuthenticationSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
ILogger<GitHubAuthenticationSettingsDisplayDriver> logger)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_dataProtectionProvider = dataProtectionProvider;
_httpContextAccessor = httpContextAccessor;
Expand Down Expand Up @@ -95,7 +95,7 @@ public override async Task<IDisplayResult> UpdateAsync(GitHubAuthenticationSetti
settings.CallbackPath = model.CallbackUrl;
settings.SaveTokens = model.SaveTokens;

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ namespace OrchardCore.Google.Authentication.Drivers
{
public class GoogleAuthenticationSettingsDisplayDriver : SectionDisplayDriver<ISite, GoogleAuthenticationSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public GoogleAuthenticationSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
ILogger<GoogleAuthenticationSettingsDisplayDriver> logger)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_dataProtectionProvider = dataProtectionProvider;
_httpContextAccessor = httpContextAccessor;
Expand Down Expand Up @@ -97,7 +97,7 @@ public override async Task<IDisplayResult> UpdateAsync(GoogleAuthenticationSetti
settings.ClientSecret = protector.Protect(model.ClientSecret);
}

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ public class HttpsSettingsDisplayDriver : SectionDisplayDriver<ISite, HttpsSetti
{
public const string GroupId = "Https";

private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly INotifier _notifier;

protected readonly IHtmlLocalizer H;

public HttpsSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
INotifier notifier,
IHtmlLocalizer<HttpsSettingsDisplayDriver> htmlLocalizer)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_httpContextAccessor = httpContextAccessor;
_authorizationService = authorizationService;
_notifier = notifier;
Expand Down Expand Up @@ -93,7 +93,7 @@ public override async Task<IDisplayResult> UpdateAsync(HttpsSettings settings, U
settings.RequireHttpsPermanent = model.RequireHttpsPermanent;
settings.SslPort = model.SslPort;

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace OrchardCore.Localization.Drivers
public class LocalizationSettingsDisplayDriver : SectionDisplayDriver<ISite, LocalizationSettings>
{
public const string GroupId = "localization";
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly INotifier _notifier;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand All @@ -35,7 +35,7 @@ public class LocalizationSettingsDisplayDriver : SectionDisplayDriver<ISite, Loc
protected readonly IStringLocalizer S;

public LocalizationSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
INotifier notifier,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
Expand All @@ -44,7 +44,7 @@ public class LocalizationSettingsDisplayDriver : SectionDisplayDriver<ISite, Loc
IStringLocalizer<LocalizationSettingsDisplayDriver> stringLocalizer
)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_notifier = notifier;
_httpContextAccessor = httpContextAccessor;
_authorizationService = authorizationService;
Expand Down Expand Up @@ -124,7 +124,7 @@ public override async Task<IDisplayResult> UpdateAsync(LocalizationSettings sett
}

// We always release the tenant for the default culture and also supported cultures to take effect.
_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();

// We create a transient scope with the newly selected culture to create a notification that will use it instead of the previous culture.
using (CultureScope.Create(settings.DefaultCulture, ignoreSystemSettings: _cultureOptions.IgnoreSystemSettings))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ namespace OrchardCore.Microsoft.Authentication.Drivers
{
public class AzureADSettingsDisplayDriver : SectionDisplayDriver<ISite, AzureADSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;

public AzureADSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IHttpContextAccessor httpContextAccessor)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_httpContextAccessor = httpContextAccessor;
}
Expand Down Expand Up @@ -67,7 +67,7 @@ public override async Task<IDisplayResult> UpdateAsync(AzureADSettings settings,
settings.CallbackPath = model.CallbackPath;
settings.SaveTokens = model.SaveTokens;

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ namespace OrchardCore.Microsoft.Authentication.Drivers
{
public class MicrosoftAccountSettingsDisplayDriver : SectionDisplayDriver<ISite, MicrosoftAccountSettings>
{
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IShellReleaseManager _shellReleaseManager;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public MicrosoftAccountSettingsDisplayDriver(
IDeferredShellContextReleaseService shellContextReleaseService,
IShellReleaseManager shellReleaseManager,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
ILogger<MicrosoftAccountSettingsDisplayDriver> logger)
{
_shellContextReleaseService = shellContextReleaseService;
_shellReleaseManager = shellReleaseManager;
_authorizationService = authorizationService;
_dataProtectionProvider = dataProtectionProvider;
_httpContextAccessor = httpContextAccessor;
Expand Down Expand Up @@ -97,7 +97,7 @@ public override async Task<IDisplayResult> UpdateAsync(MicrosoftAccountSettings
settings.AppSecret = protector.Protect(model.AppSecret);
}

_shellContextReleaseService.RequestRelease();
_shellReleaseManager.RequestRelease();
}

return await EditAsync(settings, context);
Expand Down

0 comments on commit 04087a0

Please sign in to comment.