예제 #1
0
        public bool ResetPar(ParInfo par, string name)
        {
            foreach (MethodDef.Param param in this.Params)
            {
                if (param.Value is VariableDef)
                {
                    VariableDef var = param.Value as VariableDef;
                    return(var.ResetPar(par, name));
                }
                else if (param.Value is ParInfo)
                {
                    if (par != null && par.GetExportValue() == ((ParInfo)(param.Value)).GetExportValue())
                    {
                        // If the name is empty, it means clearing the par.
                        if (string.IsNullOrEmpty(name))
                        {
                            param.Value = null;
                        }
                        else
                        {
                            ((ParInfo)(param.Value)).Name = name;
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
예제 #2
0
        public bool ResetPar(ParInfo par, string name)
        {
            if (m_var != null)
            {
                return(m_var.ResetPar(par, name));
            }

            if (m_method != null)
            {
                return(m_method.ResetPar(par, name));
            }

            return(false);
        }