예제 #1
0
 public List <ITechOperation> CreateTechOperations(ITechProcess techProcess, string techOperationName = "Все операции") =>
 !techProcess.Validate()
         ? new List <ITechOperation>()
         : techOperationName == "Все операции"
             ? techProcess.CreateTechOperations()
             : new List <ITechOperation>
 {
     Activator.CreateInstance(_techOperationTypes[techProcess.GetType()][techOperationName], new object[] { techProcess, techOperationName }) as ITechOperation
 };
예제 #2
0
        public List <TechOperation> CreateTechOperations(ITechProcess techProcess, string techOperationName = "Все операции")
        {
            if (!techProcess.Validate())
            {
                return(new List <TechOperation>());
            }
            if (techOperationName == "Все операции")
            {
                return(techProcess.CreateTechOperations());
            }
            var techOperation = (TechOperation)Activator.CreateInstance(_techOperationTypes[techProcess.GetType()][techOperationName]);

            techOperation.Setup(techProcess, techOperationName);
            return(new List <TechOperation> {
                techOperation
            });
        }