Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seal all display drivers #16535

Merged
merged 4 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace OrchardCore.Admin.Drivers
{
public class AdminSiteSettingsDisplayDriver : SiteDisplayDriver<AdminSettings>
public sealed class AdminSiteSettingsDisplayDriver : SiteDisplayDriver<AdminSettings>
{
public const string GroupId = "admin";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace OrchardCore.Admin.Drivers;

public class VisitSiteNavbarDisplayDriver : DisplayDriver<Navbar>
public sealed class VisitSiteNavbarDisplayDriver : DisplayDriver<Navbar>
{
public override IDisplayResult Display(Navbar model, BuildDisplayContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace OrchardCore.AdminDashboard.Drivers
{
public class DashboardContentDisplayDriver : ContentDisplayDriver
public sealed class DashboardContentDisplayDriver : ContentDisplayDriver
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.AdminDashboard.Drivers
{
public class DashboardPartDisplayDriver : ContentPartDisplayDriver<DashboardPart>
public sealed class DashboardPartDisplayDriver : ContentPartDisplayDriver<DashboardPart>
{
public override Task<IDisplayResult> DisplayAsync(DashboardPart part, BuildPartDisplayContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.AdminMenu.AdminNodes
{
public class LinkAdminNodeDriver : DisplayDriver<MenuItem, LinkAdminNode>
public sealed class LinkAdminNodeDriver : DisplayDriver<MenuItem, LinkAdminNode>
{
private readonly IAdminMenuPermissionService _adminMenuPermissionService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.AdminMenu.AdminNodes
{
public class PlaceholderAdminNodeDriver : DisplayDriver<MenuItem, PlaceholderAdminNode>
public sealed class PlaceholderAdminNodeDriver : DisplayDriver<MenuItem, PlaceholderAdminNode>
{
private readonly IAdminMenuPermissionService _adminMenuPermissionService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace OrchardCore.AdminMenu.Deployment
{
public class AdminMenuDeploymentStepDriver : DisplayDriver<DeploymentStep, AdminMenuDeploymentStep>
public sealed class AdminMenuDeploymentStepDriver : DisplayDriver<DeploymentStep, AdminMenuDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AdminMenuDeploymentStep step, BuildDisplayContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

namespace OrchardCore.Alias.Drivers
{
public class AliasPartDisplayDriver : ContentPartDisplayDriver<AliasPart>
public sealed class AliasPartDisplayDriver : ContentPartDisplayDriver<AliasPart>
{
private readonly ISession _session;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public AliasPartDisplayDriver(
ISession session,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OrchardCore.Alias.Settings
{
public class AliasPartSettingsDisplayDriver : ContentTypePartDefinitionDisplayDriver<AliasPart>
public sealed class AliasPartSettingsDisplayDriver : ContentTypePartDefinitionDisplayDriver<AliasPart>
{
private readonly ILiquidTemplateManager _templateManager;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public AliasPartSettingsDisplayDriver(
ILiquidTemplateManager templateManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace OrchardCore.ArchiveLater.Drivers;

public class ArchiveLaterPartDisplayDriver : ContentPartDisplayDriver<ArchiveLaterPart>
public sealed class ArchiveLaterPartDisplayDriver : ContentPartDisplayDriver<ArchiveLaterPart>
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.AuditTrail.Drivers
{
public class AuditTrailEventDisplayDriver : DisplayDriver<AuditTrailEvent>
public sealed class AuditTrailEventDisplayDriver : DisplayDriver<AuditTrailEvent>
{
private readonly IAuditTrailManager _auditTrailManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace OrchardCore.AuditTrail.Drivers
{
public class AuditTrailOptionsDisplayDriver : DisplayDriver<AuditTrailIndexOptions>
public sealed class AuditTrailOptionsDisplayDriver : DisplayDriver<AuditTrailIndexOptions>
{
// Maintain the Options prefix for compatibility with binding.
protected override void BuildPrefix(AuditTrailIndexOptions options, string htmlFieldPrefix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace OrchardCore.AuditTrail.Drivers
{
public class AuditTrailSettingsDisplayDriver : SiteDisplayDriver<AuditTrailSettings>
public sealed class AuditTrailSettingsDisplayDriver : SiteDisplayDriver<AuditTrailSettings>
{
private readonly IAuditTrailManager _auditTrailManager;
private readonly IHttpContextAccessor _httpContextAccessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace OrchardCore.AuditTrail.Drivers
{
public class AuditTrailTrimmingSettingsDisplayDriver : SiteDisplayDriver<AuditTrailTrimmingSettings>
public sealed class AuditTrailTrimmingSettingsDisplayDriver : SiteDisplayDriver<AuditTrailTrimmingSettings>
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

namespace OrchardCore.Autoroute.Drivers
{
public class AutoroutePartDisplayDriver : ContentPartDisplayDriver<AutoroutePart>
public sealed class AutoroutePartDisplayDriver : ContentPartDisplayDriver<AutoroutePart>
{
private readonly AutorouteOptions _options;
private readonly ISiteService _siteService;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly YesSql.ISession _session;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public AutoroutePartDisplayDriver(
IOptions<AutorouteOptions> options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OrchardCore.Autoroute.RemotePublishing
{
public class AutorouteMetaWeblogDriver : MetaWeblogDriver
public sealed class AutorouteMetaWeblogDriver : MetaWeblogDriver
{
public override void SetCapabilities(Action<string, string> setCapability)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace OrchardCore.Autoroute.Settings
{
public class AutoroutePartSettingsDisplayDriver : ContentTypePartDefinitionDisplayDriver<AutoroutePart>
public sealed class AutoroutePartSettingsDisplayDriver : ContentTypePartDefinitionDisplayDriver<AutoroutePart>
{
private readonly ILiquidTemplateManager _templateManager;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public AutoroutePartSettingsDisplayDriver(
ILiquidTemplateManager templateManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OrchardCore.ContentFields.Drivers
{
public class BooleanFieldDisplayDriver : ContentFieldDisplayDriver<BooleanField>
public sealed class BooleanFieldDisplayDriver : ContentFieldDisplayDriver<BooleanField>
{
public override IDisplayResult Display(BooleanField field, BuildFieldDisplayContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@

namespace OrchardCore.ContentFields.Drivers
{
public class ContentPickerFieldDisplayDriver : ContentFieldDisplayDriver<ContentPickerField>
public sealed class ContentPickerFieldDisplayDriver : ContentFieldDisplayDriver<ContentPickerField>
{
private readonly IContentManager _contentManager;
private readonly ILiquidTemplateManager _templateManager;
protected readonly IStringLocalizer S;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;

internal readonly IStringLocalizer S;

public ContentPickerFieldDisplayDriver(
IContentManager contentManager,
IStringLocalizer<ContentPickerFieldDisplayDriver> localizer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

namespace OrchardCore.ContentFields.Drivers
{
public class DateFieldDisplayDriver : ContentFieldDisplayDriver<DateField>
public sealed class DateFieldDisplayDriver : ContentFieldDisplayDriver<DateField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public DateFieldDisplayDriver(IStringLocalizer<DateFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

namespace OrchardCore.ContentFields.Drivers
{
public class DateTimeFieldDisplayDriver : ContentFieldDisplayDriver<DateTimeField>
public sealed class DateTimeFieldDisplayDriver : ContentFieldDisplayDriver<DateTimeField>
{
protected readonly IStringLocalizer S;
private readonly ILocalClock _localClock;

internal readonly IStringLocalizer S;

public DateTimeFieldDisplayDriver(
ILocalClock localClock,
IStringLocalizer<DateTimeFieldDisplayDriver> localizer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

namespace OrchardCore.ContentFields.Drivers
{
public class HtmlFieldDisplayDriver : ContentFieldDisplayDriver<HtmlField>
public sealed class HtmlFieldDisplayDriver : ContentFieldDisplayDriver<HtmlField>
{
private readonly ILiquidTemplateManager _liquidTemplateManager;
private readonly HtmlEncoder _htmlEncoder;
private readonly IHtmlSanitizerService _htmlSanitizerService;
private readonly IShortcodeService _shortcodeService;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public HtmlFieldDisplayDriver(
ILiquidTemplateManager liquidTemplateManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

namespace OrchardCore.ContentFields.Drivers
{
public class LinkFieldDisplayDriver : ContentFieldDisplayDriver<LinkField>
public sealed class LinkFieldDisplayDriver : ContentFieldDisplayDriver<LinkField>
{
private readonly IUrlHelperFactory _urlHelperFactory;
private readonly IActionContextAccessor _actionContextAccessor;
private readonly IHtmlSanitizerService _htmlSanitizerService;
private readonly HtmlEncoder _htmlencoder;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public LinkFieldDisplayDriver(
IUrlHelperFactory urlHelperFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
namespace OrchardCore.ContentFields.Drivers
{
[RequireFeatures("OrchardCore.ContentLocalization")]
public class LocalizationSetContentPickerFieldDisplayDriver : ContentFieldDisplayDriver<LocalizationSetContentPickerField>
public sealed class LocalizationSetContentPickerFieldDisplayDriver : ContentFieldDisplayDriver<LocalizationSetContentPickerField>
{
private readonly IContentManager _contentManager;
private readonly IContentLocalizationManager _contentLocalizationManager;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public LocalizationSetContentPickerFieldDisplayDriver(
IContentManager contentManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

namespace OrchardCore.ContentFields.Fields
{
public class MultiTextFieldDisplayDriver : ContentFieldDisplayDriver<MultiTextField>
public sealed class MultiTextFieldDisplayDriver : ContentFieldDisplayDriver<MultiTextField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public MultiTextFieldDisplayDriver(IStringLocalizer<MultiTextFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

namespace OrchardCore.ContentFields.Drivers
{
public class NumericFieldDisplayDriver : ContentFieldDisplayDriver<NumericField>
public sealed class NumericFieldDisplayDriver : ContentFieldDisplayDriver<NumericField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public NumericFieldDisplayDriver(IStringLocalizer<NumericFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

namespace OrchardCore.ContentFields.Drivers
{
public class TextFieldDisplayDriver : ContentFieldDisplayDriver<TextField>
public sealed class TextFieldDisplayDriver : ContentFieldDisplayDriver<TextField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public TextFieldDisplayDriver(IStringLocalizer<TextFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

namespace OrchardCore.ContentFields.Drivers
{
public class TimeFieldDisplayDriver : ContentFieldDisplayDriver<TimeField>
public sealed class TimeFieldDisplayDriver : ContentFieldDisplayDriver<TimeField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public TimeFieldDisplayDriver(IStringLocalizer<TimeFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

namespace OrchardCore.ContentFields.Drivers
{
public class UserPickerFieldDisplayDriver : ContentFieldDisplayDriver<UserPickerField>
public sealed class UserPickerFieldDisplayDriver : ContentFieldDisplayDriver<UserPickerField>
{
private readonly ISession _session;
protected readonly IStringLocalizer S;

internal readonly IStringLocalizer S;

public UserPickerFieldDisplayDriver(
ISession session,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace OrchardCore.ContentFields.Drivers
{
public class UserPickerFieldUserNamesDisplayDriver : ContentFieldDisplayDriver<UserPickerField>
public sealed class UserPickerFieldUserNamesDisplayDriver : ContentFieldDisplayDriver<UserPickerField>
{
public override IDisplayResult Display(UserPickerField field, BuildFieldDisplayContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

namespace OrchardCore.ContentFields.Drivers
{
public class YoutubeFieldDisplayDriver : ContentFieldDisplayDriver<YoutubeField>
public sealed class YoutubeFieldDisplayDriver : ContentFieldDisplayDriver<YoutubeField>
{
protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public YoutubeFieldDisplayDriver(IStringLocalizer<YoutubeFieldDisplayDriver> localizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.ContentFields.Settings
{
public class BooleanFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<BooleanField>
public sealed class BooleanFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<BooleanField>
{
public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition, BuildEditorContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

namespace OrchardCore.ContentFields.Settings
{
public class ContentPickerFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<ContentPickerField>
public sealed class ContentPickerFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<ContentPickerField>
{
private readonly ILiquidTemplateManager _templateManager;

protected readonly IStringLocalizer S;
internal readonly IStringLocalizer S;

public ContentPickerFieldSettingsDriver(
ILiquidTemplateManager templateManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OrchardCore.ContentFields.Settings
{
public class DateFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<DateField>
public sealed class DateFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<DateField>
{
public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition, BuildEditorContext context)
{
Expand Down
Loading