Guest User

Untitled

a guest
Dec 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. using Sitecore.Services.Examples.Catalog.Pipelines;
  2. using Sitecore.Services.Examples.Catalog.Pipelines.Blocks;
  3.  
  4. namespace Sitecore.Services.Examples.Catalog
  5. {
  6. using System.Reflection;
  7. using Microsoft.Extensions.DependencyInjection;
  8. using Commerce.Core;
  9. using Framework.Configuration;
  10. using Sitecore.Framework.Pipelines.Definitions.Extensions;
  11. using Commerce.EntityViews;
  12. using Sitecore.Commerce.Plugin.Catalog;
  13.  
  14. public class ConfigureSitecore : IConfigureSitecore
  15. {
  16. /// <summary>
  17. /// The configure services.
  18. /// </summary>
  19. /// <param name="services">
  20. /// The services.
  21. /// </param>
  22. public void ConfigureServices(IServiceCollection services)
  23. {
  24. var assembly = Assembly.GetExecutingAssembly();
  25. services.RegisterAllPipelineBlocks(assembly);
  26.  
  27. services.Sitecore().Pipelines(config => config
  28.  
  29. .AddPipeline<ICreateUpdateSellableItemPipeline, CreateUpdateSellableItemPipeline>(
  30. configure =>
  31. {
  32. configure.Add<CreateUpdateSellableItemBlock>();
  33. })
  34.  
  35. .ConfigurePipeline<IConfigureServiceApiPipeline>(configure => configure.Add<ConfigureServiceApiBlock>()));
  36.  
  37. services.RegisterAllCommands(assembly);
  38. }
  39. }
  40. }
Add Comment
Please, Sign In to add comment