Ejemplo n.º 1
0
        protected MultistepActionServiceContext CreateContext(int parentId, int id, int[] ids, bool?boundToExternal)
        {
            var action       = BackendActionService.GetByCode(ActionCode);
            var itemsPerStep = action.EntityLimit ?? 1;
            var state        = new MultistepActionStageCommandState
            {
                ParentId          = parentId,
                Id                = id,
                Ids               = ids,
                ExtensionContents = ContentRepository.GetList(
                    ContentRepository.GetReferencedAggregatedContentIds(parentId, ids ?? new int[0])
                    ).ToArray(),
                BoundToExternal = boundToExternal,
                ItemsPerStep    = itemsPerStep
            };

            Command = (TCommand)CreateCommand(state);
            return(new MultistepActionServiceContext {
                CommandStates = new[] { Command.GetState() }
            });
        }
Ejemplo n.º 2
0
 public XmlDbUpdateRecordedAction()
 {
     _backendAction = new InitPropertyValue <BackendAction>(() => BackendActionService.GetByCode(Code));
 }