Exemple #1
0
        private void SetVariableAndArgumentType(string paramValue, ITypeData type, VariableTreeTable variableTree,
                                                ISequenceFlowContainer parent)
        {
            IVariable variable;
            IArgument argument;
            string    variableName = ModuleUtils.GetVarNameByParamValue(paramValue);

            if (null != (variable = variableTree.GetVariable(variableName)))
            {
                if (!ModuleUtils.IsPropertyParam(paramValue))
                {
                    variable.Type = type;
                }
            }
            else if (null != (argument = variableTree.GetArgument(variableName)))
            {
                if (!ModuleUtils.IsPropertyParam(paramValue))
                {
                    argument.Type = type;
                }
            }
            else
            {
                ThrowIfVariableNotFound(variableName, parent);
            }
        }
        private void SetVariableAndArgumentType(string variableName, ITypeData type, VariableTreeTable variableTree,
                                                ISequenceFlowContainer parent)
        {
            IVariable variable;
            IArgument argument;

            if (null != (variable = variableTree.GetVariable(variableName)))
            {
                variable.Type = type;
            }
            else if (null != (argument = variableTree.GetArgument(variableName)))
            {
                argument.Type = type;
            }
            else
            {
                ThrowIfVariableNotFound(variableName, parent);
            }
        }