private bool visible; // Is this paramater's tab visible. #endregion Fields #region Constructors public Parameter(ParameterDefinition pd) { definition = pd; value = null; dirty = true; defaultingWhenUnconnected = true; if (pd != null) { visible = pd.DefaultVisibility; cacheability = pd.DefaultCacheability; } else { visible = true; cacheability = Cacheability.OutputFullyCached; } }
public bool setValue(String value, DXTypeVals type, bool coerce) { bool success = false; if (this.value == null) this.value = new DXValue(); if (type == DXTypeVals.UndefinedType && value == null) { this.value = null; success = true; } else { ParameterDefinition pd = this.Definition; bool typeMatch = false; foreach (DXType dxt in pd.getTypes()) { if (DXType.MatchType(type, dxt.getType())) { typeMatch = true; break; } } if (typeMatch && ( this.value.setValue(value, type) || (coerce && this.coerceAndSetValue(value, type)))) success = true; else success = false; } if (success) { setDirty(); if (type == DXTypeVals.UndefinedType && value == null) setUnconnectedDefaultingStatus(true); else setUnconnectedDefaultingStatus(false); } return success; }