Created
August 31, 2018 21:01
-
-
Save websterian/5fbec88f20098b4d7b4acb11a5137eb6 to your computer and use it in GitHub Desktop.
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
namespace Sitecore.Commerce.Plugin.Sample | |
{ | |
using System.Reflection; | |
using Microsoft.Extensions.DependencyInjection; | |
using Sitecore.Commerce.Core; | |
using Sitecore.Framework.Configuration; | |
using Sitecore.Framework.Pipelines.Definitions.Extensions; | |
using Sitecore.Services.Examples.Indexing; | |
using Sitecore.Commerce.EntityViews; | |
using Sitecore.Commerce.Plugin.Catalog; | |
public class ConfigureSitecore : IConfigureSitecore | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
var assembly = Assembly.GetExecutingAssembly(); | |
services.RegisterAllPipelineBlocks(assembly); | |
services.Sitecore().Pipelines(config => config | |
.AddPipeline<IGenerateFacetsPipeline, GenerateFacetsPipeline>( | |
configure => {configure.Add<FacetsBlock>();}) | |
.ConfigurePipeline<IConfigureServiceApiPipeline>(configure => configure.Add<Services.Examples.Indexing.ConfigureServiceApiBlock>())); | |
services.Sitecore().Pipelines(config => config | |
.ConfigurePipeline<IGetEntityViewPipeline>(c => c.Add<GetFacetsViewBlock>().After<GetSellableItemDetailsViewBlock>())); | |
services.RegisterAllCommands(assembly); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment