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); }
public string GetExportValue(object obj) { Debug.Check(_bParamFromStruct); ParInfo par = this._value as ParInfo; if (par != null) { return(par.GetExportValue()); } VariableDef var = this._value as VariableDef; if (var != null) { return(var.GetExportValue()); } object o = obj; //if (o == null) //{ // o = this._object; //} //if (o != null && this._bParamFromStruct) //{ // object m = this._property.GetValue(o); // return this._attribute.GetExportValue(o, m); //} return(this._attribute.GetExportValue(o, this._value)); }
public bool CheckPar(ParInfo par) { if (_valueClass == kPar && _value is ParInfo) { if (par.GetExportValue() == ((ParInfo)(_value)).GetExportValue()) { return(true); } } return(false); }
public bool CheckPar(ParInfo par) { foreach (MethodDef.Param param in this.Params) { if (param.Value is VariableDef) { VariableDef var = param.Value as VariableDef; return(var.CheckPar(par)); } else if (param.Value is ParInfo) { if (par.GetExportValue() == ((ParInfo)(param.Value)).GetExportValue()) { return(true); } } } return(false); }
public bool ResetPar(ParInfo par, string name) { if (_valueClass == kPar && _value is ParInfo) { if (par != null && par.GetExportValue() == ((ParInfo)(_value)).GetExportValue()) { // If the name is empty, it means clearing the par. if (string.IsNullOrEmpty(name)) { _value = null; } else { ((ParInfo)(_value)).Name = name; } return(true); } } return(false); }
public bool CheckPar(ParInfo par) { foreach (MethodDef.Param param in this.Params) { if (param.Value is VariableDef) { VariableDef var = param.Value as VariableDef; bool bOk = var.CheckPar(par); if (bOk) { return true; } } else if (param.Value is ParInfo) { if (par.GetExportValue() == ((ParInfo)(param.Value)).GetExportValue()) { return true; } } } return false; }
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; }
public bool ResetPar(ParInfo par, string name) { if (_valueClass == kPar && _value is ParInfo) { if (par != null && par.GetExportValue() == ((ParInfo)(_value)).GetExportValue()) { // If the name is empty, it means clearing the par. if (string.IsNullOrEmpty(name)) _value = null; else ((ParInfo)(_value)).Name = name; return true; } } return false; }
public bool CheckPar(ParInfo par) { if (_valueClass == kPar && _value is ParInfo) { if (par.GetExportValue() == ((ParInfo)(_value)).GetExportValue()) return true; } return false; }