Skip to content

Instantly share code, notes, and snippets.

@websterian
Created August 10, 2018 22:05
Embed
What would you like to do?
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.Composer;
public class ConfigureSitecore : IConfigureSitecore
{
public void ConfigureServices(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
services.RegisterAllPipelineBlocks(assembly);
services.Sitecore().Pipelines(config => config
.AddPipeline<ICreateComposerTemplatesPipeline, CreateComposerTemplatesPipeline>(
configure =>
{
configure.Add<CreateComposerTemplatesBlock>();
})
.ConfigurePipeline<IConfigureServiceApiPipeline>(configure => configure.Add<Services.Examples.Composer.ConfigureServiceApiBlock>()));
services.RegisterAllCommands(assembly);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment