Created
October 10, 2018 20:27
-
-
Save websterian/2e477f3805771ea75e5c7184b67667ed 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
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