Created
December 17, 2018 18:23
-
-
Save websterian/9f1a8c7438f77a47e0c8f399b85b9ed0 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.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