示例#1
0
        public LoadStageNodeMenu(RDMPContextMenuStripArgs args, LoadStageNode loadStageNode) : base(args, loadStageNode)
        {
            _loadStageNode = loadStageNode;
            _mef           = _activator.RepositoryLocator.CatalogueRepository.MEF;

            AddMenu <IDataProvider>("Add Cached Data Provider", t => typeof(ICachedDataProvider).IsAssignableFrom(t));
            AddMenu <IDataProvider>("Add Data Provider", t => !typeof(ICachedDataProvider).IsAssignableFrom(t));

            AddMenu <IAttacher>("Add Attacher");
            AddMenu <IMutilateDataTables>("Add Mutilator");

            Add(new ExecuteCommandCreateNewFileBasedProcessTask(_activator, ProcessTaskType.SQLFile, loadStageNode.LoadMetadata, loadStageNode.LoadStage));
            Add(new ExecuteCommandCreateNewFileBasedProcessTask(_activator, ProcessTaskType.Executable, loadStageNode.LoadMetadata, loadStageNode.LoadStage));
        }
示例#2
0
        public ExecuteCommandChangeLoadStage(IActivateItems activator, ProcessTaskCommand sourceProcessTaskCommand, LoadStageNode targetStage) : base(activator)
        {
            _sourceProcessTask = sourceProcessTaskCommand.ProcessTask;
            _targetStage       = targetStage;

            if (sourceProcessTaskCommand.ProcessTask.LoadMetadata_ID != targetStage.LoadMetadata.ID)
            {
                SetImpossible("ProcessTask belongs to a different LoadMetadata");
            }

            if (!ProcessTask.IsCompatibleStage(_sourceProcessTask.ProcessTaskType, _targetStage.LoadStage))
            {
                SetImpossible("Task type '" + _sourceProcessTask.ProcessTaskType + "' cannot run in " + _targetStage.LoadStage);
            }
        }