-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
95 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Extensions/LiquidCoreServices.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Fluid; | ||
using Microsoft.AspNetCore.Mvc.ApplicationParts; | ||
using Microsoft.AspNetCore.Mvc.Razor.Compilation; | ||
using Microsoft.Extensions.Options; | ||
using OrchardCore.DisplayManagement.Descriptors.ShapeTemplateStrategy; | ||
using OrchardCore.DisplayManagement.Liquid; | ||
using OrchardCore.DisplayManagement.Liquid.TagHelpers; | ||
using OrchardCore.DisplayManagement.Liquid.Tags; | ||
using OrchardCore.DisplayManagement.Razor; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection; | ||
|
||
public static class LiquidCoreServices | ||
{ | ||
public static IServiceCollection AddLiquidCoreServices(this IServiceCollection services) | ||
{ | ||
services.AddSingleton<LiquidViewParser>(); | ||
services.AddSingleton<IAnchorTag, AnchorTag>(); | ||
|
||
services.AddTransient<IConfigureOptions<TemplateOptions>, TemplateOptionsFileProviderSetup>(); | ||
|
||
services.AddTransient<IConfigureOptions<LiquidViewOptions>, LiquidViewOptionsSetup>(); | ||
|
||
services.AddTransient<IConfigureOptions<ShapeTemplateOptions>, LiquidShapeTemplateOptionsSetup>(); | ||
|
||
services.AddSingleton<IApplicationFeatureProvider<ViewsFeature>, LiquidViewsFeatureProvider>(); | ||
services.AddScoped<IRazorViewExtensionProvider, LiquidViewExtensionProvider>(); | ||
services.AddSingleton<LiquidTagHelperFactory>(); | ||
|
||
services.AddSingleton<IConfigureOptions<TemplateOptions>, TemplateOptionsConfigurations>(); | ||
|
||
return services; | ||
} | ||
} |
41 changes: 2 additions & 39 deletions
41
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters