Esempio n. 1
0
        public void Execute(IProcessingContext processingContext, ITransactionScopeContext transactionScopeContext)
        {
            KraftModule   loadedModule  = _KraftModuleCollection.GetModule(processingContext.InputModel.Module);
            LoadedNodeSet loadedNodeSet = _NodesSetService.LoadNodeSet(
                processingContext.InputModel.Module,
                processingContext.InputModel.NodeSet,
                processingContext.InputModel.Nodepath);
            StringBuilder sb;

            if (!CheckValidity(processingContext, loadedModule, loadedNodeSet, out sb))
            {
                PluginAccessorImp <IDataLoaderPlugin> externalService = new PluginAccessorImp <IDataLoaderPlugin>(transactionScopeContext, loadedModule.ModuleSettings);
                PluginAccessorImp <INodePlugin>       customService   = new PluginAccessorImp <INodePlugin>(transactionScopeContext, loadedModule.ModuleSettings);
                INodeTaskExecutor taskExecutor = new NodeTaskExecutor(transactionScopeContext, loadedModule.ModuleSettings);
                taskExecutor.Execute(loadedNodeSet, processingContext, externalService, customService);
            }
            else
            {
                processingContext.ReturnModel.Status.IsSuccessful = false;
                processingContext.ReturnModel.Status.StatusResults.Add(new StatusResult()
                {
                    Message = sb.ToString(), StatusResultType = SysPlugins.Interfaces.Packet.StatusResultEnum.EStatusResult.StatusResultError
                });
            }
        }
Esempio n. 2
0
        public override void Execute(IProcessingContext processingContext, ITransactionScopeContext transactionScopeContext)
        {
            KraftModule   loadedModule  = _KraftModuleCollection.GetModule(processingContext.InputModel.Module);
            LoadedNodeSet loadedNodeSet = _NodesSetService.LoadNodeSet(
                processingContext.InputModel.Module,
                processingContext.InputModel.NodeSet,
                processingContext.InputModel.Nodepath);

            if (CheckValidity(processingContext, loadedModule, loadedNodeSet))
            {
                PluginAccessorImp <IDataLoaderPlugin> externalService = new PluginAccessorImp <IDataLoaderPlugin>(transactionScopeContext, loadedModule.ModuleSettings);
                PluginAccessorImp <INodePlugin>       customService   = new PluginAccessorImp <INodePlugin>(transactionScopeContext, loadedModule.ModuleSettings);
                INodeTaskExecutor taskExecutor = new NodeTaskExecutor(transactionScopeContext, loadedModule.ModuleSettings);
                taskExecutor.Execute(loadedNodeSet, processingContext, externalService, customService);
            }
        }