public static IComponentLocalizationMapper GetItemVariantComponentLocalizationMapper(this Mappings mappings, CommerceEntity targetEntity, Component component, ILanguageEntity languageEntity, object sourceVariant, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var mapperType = mappings .ItemVariationMappings .FirstOrDefault(); if (mapperType != null) { var t = Type.GetType(mapperType.LocalizationFullTypeName ?? mapperType.FullTypeName); if (t != null) { if (Activator.CreateInstance(t, languageEntity.GetEntity(), sourceVariant, targetEntity, component, commerceCommander, context) is IComponentLocalizationMapper mapper) { return(mapper); } } } return(null); }
public ImportPriceBooksPrepareBlock( CommerceCommander commander) : base(commander) { this.RemoveAllInventorySetsPipeline = commander.Pipeline <IRemoveAllPriceBooksPipeline>(); }
/// <inheritdoc /> /// <summary>Initializes a new instance of the <see cref="T:Sitecore.Framework.Pipelines.PipelineBlock" /> class.</summary> /// <param name="commander">The commerce commander.</param> public GetCartMessagesViewBlock(CommerceCommander commander) : base(null) { this.Commander = commander; }
/// <summary> /// Initializes a new instance of the <see cref="EnsureNavigationView"/> class. /// </summary> /// <param name="commerceCommander">The <see cref="CommerceCommander"/> is a gateway object to resolving and executing other Commerce Commands and other control points.</param> public EnsureNavigationView(CommerceCommander commerceCommander) { this._commerceCommander = commerceCommander; }
public FormAddPhysicalFulfillment(CommerceCommander commerceCommander, GetCartCommand getCartCommand) { this._commerceCommander = commerceCommander; this._getCartCommand = getCartCommand; }
public DoActionClearPriceCards(CommerceCommander commerceCommander) { this._commerceCommander = commerceCommander; }
/// <summary> /// Initializes a new instance of the <see cref="InitializeEnvironmentBundlesBlock"/> class. /// </summary> public InitializeEnvironmentBundlesBlock(CommerceCommander commerceCommander) { this._commerceCommander = commerceCommander; }
public static async Task <T> GetSettingPolicy <T>(this CommercePipelineExecutionContext context, CommerceCommander commander) where T : Policy { var activeSetting = await commander.Command <GetActiveSettingCommand>().Process(context.CommerceContext); return(activeSetting?.HasPolicy <T>() ?? false ? activeSetting.GetPolicy <T>() : context.GetPolicy <T>()); }
/// <inheritdoc /> /// <summary>Initializes a new instance of the <see cref="T:Sitecore.Framework.Pipelines.PipelineBlock" /> class.</summary> /// <param name="commander">The commerce commander.</param> public DoActionAddQualificationBlock(CommerceCommander commander) : base(commander) { }
public static IComponentMapper GetEntityComponentMapper(this Mappings mappings, CommerceEntity targetEntity, ImportEntityArgument importEntityArgument, string componentMappingKey, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var mapperType = mappings .EntityComponentMappings .FirstOrDefault(x => x.Key.Equals(componentMappingKey, StringComparison.OrdinalIgnoreCase)); if (mapperType != null) { var t = Type.GetType(mapperType.FullTypeName); if (t != null) { if (Activator.CreateInstance(t, importEntityArgument.SourceEntity, targetEntity, commerceCommander, context) is IComponentMapper mapper) { return(mapper); } } } return(null); }
public RenameCustomerBlock(CommerceCommander commander) : base(null) { this.Commander = commander; }
public static IEntityLocalizationMapper GetEntityLocalizationMapper(this Mappings mappings, ILanguageEntity languageEntity, ImportEntityArgument importEntityArgument, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var mapperType = mappings .EntityMappings .FirstOrDefault(x => x.Key.Equals(importEntityArgument.SourceEntityDetail.EntityType, StringComparison.OrdinalIgnoreCase)); if (mapperType != null) { var t = Type.GetType(mapperType.ImportHandlerTypeName ?? mapperType.FullTypeName ?? mapperType.LocalizationFullTypeName); if (t != null) { if (Activator.CreateInstance(t, languageEntity.GetEntity(), commerceCommander, context) is IEntityLocalizationMapper mapper) { return(mapper); } } } return(null); }
public static IRelationshipMapper GetRelationshipMapper(this Mappings mappings, ImportEntityArgument importEntityArgument, string relationshipName, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var mapperType = mappings .RelationshipMappings .FirstOrDefault(x => x.Key.Equals(relationshipName, StringComparison.OrdinalIgnoreCase)); if (mapperType != null) { var t = Type.GetType(mapperType.FullTypeName); if (t != null) { if (Activator.CreateInstance(t, commerceCommander, context) is IRelationshipMapper mapper) { return(mapper); } } } return(null); }
public static IComponentLocalizationMapper GetComponentChildComponentLocalizationMapper(this Mappings mappings, CommerceEntity targetEntity, Component component, ILanguageEntity languageEntity, object sourceVariant, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var metadataPolicy = component.GetComponentMetadataPolicy(); var mapperType = mappings .ItemVariationComponentMappings .FirstOrDefault( x => (metadataPolicy != null && !string.IsNullOrEmpty(metadataPolicy.MapperKey) && x.Key.Equals(metadataPolicy.MapperKey, StringComparison.OrdinalIgnoreCase)) || x.Type.Equals(component.GetType().FullName, StringComparison.OrdinalIgnoreCase)); if (mapperType != null) { var t = Type.GetType(mapperType.LocalizationFullTypeName ?? mapperType.FullTypeName); if (t != null) { if (Activator.CreateInstance(t, languageEntity.GetEntity(), sourceVariant, targetEntity, component, commerceCommander, context) is IComponentLocalizationMapper mapper) { return(mapper); } } } return(null); }
protected BaseEntityImportHandler(string sourceEntity, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { SourceEntity = JsonConvert.DeserializeObject <TSourceEntity>(sourceEntity); CommerceCommander = commerceCommander; Context = context; }
/// <summary> /// Public contructor /// </summary> /// <param name="commerceCommander"></param> /// <param name="composerCommander"></param> /// <param name="importHelper"></param> public CreateOrUpdateSellableItemBlock(CommerceCommander commerceCommander, ComposerCommander composerCommander) { _commerceCommander = commerceCommander; _importHelper = new CommerceEntityImportHelper(commerceCommander, composerCommander); }
public VariantComponentMapper(SourceProduct product, SourceProductVariant productVariant, CommerceEntity commerceEntity, Component parentComponent, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) : base(product, productVariant, commerceEntity, parentComponent, commerceCommander, context) { }
public UpdatePriceSnapshotCommand(CommerceCommander commander, IServiceProvider serviceProvider) : base(serviceProvider) { this.Commander = commander; }
public CreateRelationshipBlock(CommerceCommander commerceCommander) { _commerceCommander = commerceCommander; }
public EntityViewAppService(CommerceCommander commerceCommander) { _commerceCommander = commerceCommander; }
public FormAddGiftCardPayment(CommerceCommander commerceCommander, GetCartCommand getCartCommand) { this._commerceCommander = commerceCommander; this._getCartCommand = getCartCommand; }
public FormEditPolicy( CommerceCommander commerceCommander) { this._commerceCommander = commerceCommander; }
/// <inheritdoc /> /// <summary>Initializes a new instance of the <see cref="T:Sitecore.Framework.Pipelines.PipelineBlock" /> class.</summary> /// <param name="commander">The commerce commander.</param> public DoActionEditBenefitBlock(CommerceCommander commander) : base(commander) { }
public GetReviewsListViewBlock(CommerceCommander commander, IFindEntitiesInListPipeline findEntitiesInListPipeline) : base(commander) { this.findEntitiesInListPipeline = findEntitiesInListPipeline; }
public EnsureActionsGeneric(CommerceCommander commerceCommander) { _commerceCommander = commerceCommander; }
/// <summary> /// Initializes a new instance of the <see cref="FormStartSelling"/> class. /// </summary> /// <param name="commerceCommander">The <see cref="CommerceCommander"/> is a gateway object to resolving and executing other Commerce Commands and other control points.</param> public FormStartSelling(CommerceCommander commerceCommander) { this._commerceCommander = commerceCommander; }
public SourceInventorySetImportHandler(string sourceInventorySet, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) : base(sourceInventorySet, commerceCommander, context) { }
public SetEntityComponentsBlock(CommerceCommander commerceCommander) { _commerceCommander = commerceCommander; }
public PersistCounterBlock(CommerceCommander commander) : base(null) { this.Commander = commander; }
public static IComponentMapper GetItemVariationComponentMapper(this Mappings mappings, CommerceEntity targetEntity, Component parentComponent, ImportEntityArgument importEntityArgument, object sourceComponent, CommerceCommander commerceCommander, CommercePipelineExecutionContext context) { var mapperType = mappings .ItemVariationMappings .FirstOrDefault(); if (mapperType != null) { var t = Type.GetType(mapperType.FullTypeName); if (t != null) { if (Activator.CreateInstance(t, importEntityArgument.SourceEntity, sourceComponent, targetEntity, parentComponent, commerceCommander, context) is IComponentMapper mapper) { return(mapper); } } } return(null); }