コード例 #1
0
        public void AssignValue(ParameterManager processParameterManager, ParameterManager actionInParameterManager)
        {
            try
            {
                switch (ParameterBindType)
                {
                case ParameterBindType.ActionProcessBasicParameterBind:
                    /*StepAction.ActionInParameterManager*/
                    actionInParameterManager.AlterBasicParameterValue(ActionParameterName,
                                                                      /*ProcessInstance.ProcessParameterManager*/
                                                                      processParameterManager.GetBasicParameter(ProcessParameterName).GetValue());
                    break;

                case ParameterBindType.ActionConstBasicParameterBind:
                    /*StepAction.ActionInParameterManager*/
                    actionInParameterManager.AlterParameterValueInString(ActionParameterName,
                                                                         ConstValueString);
                    break;

                case ParameterBindType.ActionProcessListParameterBind:
                    /*StepAction.ActionInParameterManager*/
                    actionInParameterManager.ReplaceListParameterValue(ActionParameterName,
                                                                       /*ProcessInstance.ProcessParameterManager*/
                                                                       processParameterManager.GetListParameter(ProcessParameterName).GetValue());
                    break;

                case ParameterBindType.ActionProcessDictionaryParameterBind:
                    /*StepAction.ActionInParameterManager*/
                    actionInParameterManager.ReplaceDictionaryParameterValue(ActionParameterName,
                                                                             /*ProcessInstance.ProcessParameterManager*/
                                                                             processParameterManager.GetDictionaryParameter(ProcessParameterName).GetValue());
                    break;

                case ParameterBindType.ActionProcessDictionaryBasicParameterBind:
                    break;

                case ParameterBindType.ActionProcessBasicDictionaryParameterBind:
                    break;

                case ParameterBindType.InvalidBind:
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            catch (Exception e)
            {
                throw new InvalidOperationException($"InParameterBind数据赋值失败,{e.Message}");
            }
        }