Skip to content

Instantly share code, notes, and snippets.

@websterian
Created August 10, 2018 22:05
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/a9d0590587927320c1009de0821b6efa to your computer and use it in GitHub Desktop.
Save websterian/a9d0590587927320c1009de0821b6efa to your computer and use it in GitHub Desktop.
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