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

Auto register IDisplayManager<T> for T on AddTheming #11756

Merged
merged 1 commit into from
May 26, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/OrchardCore.Modules/OrchardCore.AdminMenu/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IAdminMenuService, AdminMenuService>();
services.AddScoped<AdminMenuNavigationProvidersCoordinator, AdminMenuNavigationProvidersCoordinator>();

services.AddScoped<IDisplayManager<MenuItem>, DisplayManager<MenuItem>>();

services.AddRecipeExecutionStep<AdminMenuStep>();

services.AddTransient<IDeploymentSource, AdminMenuDeploymentSource>();
Expand Down
4 changes: 1 addition & 3 deletions src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IAuditTrailManager, AuditTrailManager>();

services
.AddScoped<IDisplayManager<AuditTrailEvent>, DisplayManager<AuditTrailEvent>>()
.AddScoped<IDisplayDriver<AuditTrailEvent>, AuditTrailEventDisplayDriver>();

services.AddSingleton<IAuditTrailIdGenerator, AuditTrailIdGenerator>();
Expand All @@ -67,8 +66,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IDisplayDriver<ISite>, AuditTrailSettingsDisplayDriver>();
services.AddScoped<IDisplayDriver<ISite>, AuditTrailTrimmingSettingsDisplayDriver>();

services.AddScoped<IDisplayManager<AuditTrailIndexOptions>, DisplayManager<AuditTrailIndexOptions>>()
.AddScoped<IDisplayDriver<AuditTrailIndexOptions>, AuditTrailOptionsDisplayDriver>();
services.AddScoped<IDisplayDriver<AuditTrailIndexOptions>, AuditTrailOptionsDisplayDriver>();

services.AddScoped<IAuditTrailAdminListQueryService, DefaultAuditTrailAdminListQueryService>();

Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ async Task<FluidValue> GetContentByHandleAsync(LiquidTemplateContext context, st

services.AddScoped<IContentsAdminListQueryService, DefaultContentsAdminListQueryService>();

services.AddScoped<IDisplayManager<ContentOptionsViewModel>, DisplayManager<ContentOptionsViewModel>>();
services.AddScoped<IDisplayDriver<ContentOptionsViewModel>, ContentOptionsDisplayDriver>();

services.AddScoped(typeof(IContentItemRecursionHelper<>), typeof(ContentItemRecursionHelper<>));
Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Deployment/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IPermissionProvider, Permissions>();

services.AddScoped<IDisplayManager<DeploymentStep>, DisplayManager<DeploymentStep>>();
services.AddSingleton<IDeploymentTargetProvider, FileDownloadDeploymentTargetProvider>();

// Custom File deployment step
Expand Down
2 changes: 0 additions & 2 deletions src/OrchardCore.Modules/OrchardCore.OpenId/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public override void ConfigureServices(IServiceCollection services)
{
ServiceDescriptor.Scoped<IRoleRemovedEventHandler, OpenIdApplicationRoleRemovedEventHandler>(),
ServiceDescriptor.Scoped<IDisplayDriver<OpenIdServerSettings>, OpenIdServerSettingsDisplayDriver>(),
ServiceDescriptor.Scoped<IDisplayManager<OpenIdServerSettings>, DisplayManager<OpenIdServerSettings>>(),
ServiceDescriptor.Scoped<IRecipeStepHandler, OpenIdServerSettingsStep>(),
ServiceDescriptor.Scoped<IRecipeStepHandler, OpenIdApplicationStep>(),
ServiceDescriptor.Scoped<IRecipeStepHandler, OpenIdScopeStep>(),
Expand Down Expand Up @@ -303,7 +302,6 @@ public override void ConfigureServices(IServiceCollection services)
services.TryAddEnumerable(new[]
{
ServiceDescriptor.Scoped<IDisplayDriver<OpenIdValidationSettings>, OpenIdValidationSettingsDisplayDriver>(),
ServiceDescriptor.Scoped<IDisplayManager<OpenIdValidationSettings>, DisplayManager<OpenIdValidationSettings>>(),
ServiceDescriptor.Scoped<IRecipeStepHandler, OpenIdValidationSettingsStep>()
});

Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Queries/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IQueryManager, QueryManager>();
services.AddScoped<IDisplayManager<Query>, DisplayManager<Query>>();

services.AddScoped<IDisplayDriver<Query>, QueryDisplayDriver>();
services.AddRecipeExecutionStep<QueryStep>();
Expand Down
3 changes: 1 addition & 2 deletions src/OrchardCore.Modules/OrchardCore.Rules/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddOptions<ConditionOptions>();

// Rule services.
services.AddScoped<IDisplayManager<Condition>, DisplayManager<Condition>>()
.AddScoped<IDisplayManager<Rule>, DisplayManager<Rule>>()
services
.AddScoped<IDisplayDriver<Rule>, RuleDisplayDriver>()
.AddSingleton<IConditionIdGenerator, ConditionIdGenerator>()
.AddTransient<IConfigureOptions<ConditionOperatorOptions>, ConditionOperatorConfigureOptions>()
Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Settings/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public override void ConfigureServices(IServiceCollection services)
services.AddSingleton<ISiteService, SiteService>();

// Site Settings editor
services.AddScoped<IDisplayManager<ISite>, DisplayManager<ISite>>();
services.AddScoped<IDisplayDriver<ISite>, DefaultSiteSettingsDisplayDriver>();
services.AddScoped<IDisplayDriver<ISite>, ButtonsSettingsDisplayDriver>();
services.AddScoped<INavigationProvider, AdminMenu>();
Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Shortcodes/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public override void ConfigureServices(IServiceCollection services)

services.AddOptions<ShortcodeOptions>();
services.AddScoped<IShortcodeProvider, OptionsShortcodeProvider>();
services.AddScoped<IDisplayManager<ShortcodeDescriptor>, DisplayManager<ShortcodeDescriptor>>();
services.AddScoped<IDisplayDriver<ShortcodeDescriptor>, ShortcodeDescriptorDisplayDriver>();
}
}
Expand Down
1 change: 0 additions & 1 deletion src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public override void ConfigureServices(IServiceCollection services)

services.AddScoped<ISitemapIdGenerator, SitemapIdGenerator>();
services.AddScoped<ISitemapHelperService, SitemapHelperService>();
services.AddScoped<IDisplayManager<SitemapSource>, DisplayManager<SitemapSource>>();
services.AddScoped<ISitemapBuilder, DefaultSitemapBuilder>();
services.AddScoped<ISitemapTypeBuilder, SitemapTypeBuilder>();
services.AddScoped<ISitemapCacheProvider, DefaultSitemapCacheProvider>();
Expand Down
2 changes: 0 additions & 2 deletions src/OrchardCore.Modules/OrchardCore.Users/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public override void ConfigureServices(IServiceCollection services)

services.AddScoped<IDisplayDriver<ISite>, LoginSettingsDisplayDriver>();

services.AddScoped<IDisplayManager<User>, DisplayManager<User>>();
services.AddScoped<IDisplayDriver<User>, UserDisplayDriver>();
services.AddScoped<IDisplayDriver<User>, UserRoleDisplayDriver>();
services.AddScoped<IDisplayDriver<User>, UserInformationDisplayDriver>();
Expand All @@ -227,7 +226,6 @@ public override void ConfigureServices(IServiceCollection services)

services.AddScoped<IUsersAdminListQueryService, DefaultUsersAdminListQueryService>();

services.AddScoped<IDisplayManager<UserIndexOptions>, DisplayManager<UserIndexOptions>>();
services.AddScoped<IDisplayDriver<UserIndexOptions>, UserOptionsDisplayDriver>();

services.AddSingleton<IUsersAdminListFilterParser>(sp =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static OrchardCoreBuilder AddTheming(this OrchardCoreBuilder builder)
services.AddScoped<IShapeTableProvider, ZoneShapeAlternates>();
services.AddShapeAttributes<GroupShapes>();

services.AddScoped(typeof(IDisplayManager<>), typeof(DisplayManager<>));
services.AddScoped<IHtmlDisplay, DefaultHtmlDisplay>();
services.AddScoped<ILayoutAccessor, LayoutAccessor>();
services.AddScoped<IThemeManager, ThemeManager>();
Expand Down