Created
June 12, 2017 20:36
-
-
Save websterian/306fad0348c5dd846bc60da7a50ea18f to your computer and use it in GitHub Desktop.
Full class with code to register edit views pipeline
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
namespace Sitecore.Commerce.Connectors.MYERP.Plugin | |
{ | |
using System.Reflection; | |
using Microsoft.Extensions.DependencyInjection; | |
using Sitecore.Commerce.Connectors.MYERP.Plugin.Pipelines.Blocks; | |
using Sitecore.Commerce.Core; | |
using Sitecore.Commerce.EntityViews; | |
using Sitecore.Commerce.Plugin.Orders; | |
using Sitecore.Framework.Configuration; | |
using Sitecore.Framework.Pipelines.Definitions.Extensions; | |
/// <summary> | |
/// The configure site core. | |
/// </summary> | |
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( | |
pipeLineConfig => | |
pipeLineConfig.ConfigurePipeline<IReleasedOrdersMinionPipeline>( | |
config => config.Add<SendOrderToErpMinionBlock>() | |
.After<MoveReleasedOrderBlock>())); | |
services.Sitecore() | |
.Pipelines( | |
pipeLineConfig => | |
pipeLineConfig.ConfigurePipeline<IGetEntityViewPipeline>( | |
config => config.Add<ModifyViewsBlock>())); | |
services.RegisterAllCommands(assembly); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment