Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using Sitecore.Services.Examples.Catalog.Pipelines;
using Sitecore.Services.Examples.Catalog.Pipelines.Blocks;
namespace Sitecore.Services.Examples.Catalog
{
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Commerce.Core;
using Framework.Configuration;
using Sitecore.Framework.Pipelines.Definitions.Extensions;
using Commerce.EntityViews;
using Sitecore.Commerce.Plugin.Catalog;
public class ConfigureSitecore : IConfigureSitecore
{
/// <summary>
/// The configure services.
/// </summary>
/// <param name="services">
/// The services.
/// </param>
public void ConfigureServices(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
services.RegisterAllPipelineBlocks(assembly);
services.Sitecore().Pipelines(config => config
.AddPipeline<ICreateUpdateSellableItemPipeline, CreateUpdateSellableItemPipeline>(
configure =>
{
configure.Add<CreateUpdateSellableItemBlock>();
})
.ConfigurePipeline<IConfigureServiceApiPipeline>(configure => configure.Add<ConfigureServiceApiBlock>()));
services.RegisterAllCommands(assembly);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.