Skip to content

Instantly share code, notes, and snippets.

@websterian
Created October 10, 2018 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save websterian/2e477f3805771ea75e5c7184b67667ed to your computer and use it in GitHub Desktop.
Save websterian/2e477f3805771ea75e5c7184b67667ed to your computer and use it in GitHub Desktop.
using Sitecore.Services.Examples.Entities.Pipelines.Blocks;
namespace Sitecore.Services.Examples.Entities
{
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Commerce.Core;
using Framework.Configuration;
using Sitecore.Framework.Pipelines.Definitions.Extensions;
using Commerce.EntityViews;
using Commerce.Plugin.Catalog;
using Commerce.Plugin.BusinessUsers;
public class ConfigureSitecore : IConfigureSitecore
{
public void ConfigureServices(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
services.RegisterAllPipelineBlocks(assembly);
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IGetEntityViewPipeline>(c => c.Add<EntityViewBlock>().Before<GetSelectCatalogToAssociateItemDefinitionsViewBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IGetEntityViewPipeline>(c => c.Add<GetBrandsViewBlock>().Before<GetSelectCatalogToAssociateItemDefinitionsViewBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IGetEntityViewPipeline>(c => c.Add<GetBrandDetailsViewBlock>().Before<GetSelectCatalogToAssociateItemDefinitionsViewBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IDoActionPipeline>(c => c.Add<DoActionAddBrandBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IDoActionPipeline>(c => c.Add<DoActionRemoveBrandBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IBizFxNavigationPipeline>(c => c.Add<GetBrandsNavigationViewBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IPopulateEntityViewActionsPipeline>(c => c.Add<PopulateBrandsViewActionsBlock>()));
services.RegisterAllCommands(assembly);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment