public override void SetLast(string text) { base.SetLast(text); // Assume it is not literal. Get type from property PropertyInfo pi = U.GetPropertyInfo(_mpIDCtl.BuildFullID(BuildID())); if (pi != null) { if (_mpIDCtl.AutoLastType) { _tgtType = pi.PropertyType; } else { _tgtType = Type.GetType("System." + _mpIDCtl.ReturnType.ToString()); } IDProperty idProp = (_list.Last() as IDProperty); idProp.type = _tgtType; } else { U.LogPopup("Could not get Property info for '{0}'", text); } }
public void SetLiteralValue(string text, Type tgtType) { // Either setting the end of property link or is a literal. Only used when parsing _list.Last().IsLiteral = true; _tgtType = tgtType; if (string.IsNullOrEmpty(text)) { text = U.GetDefaultText(tgtType); } _list.Last().Text = text; IDProperty idProp = (_list.Last() as IDProperty); idProp.type = _tgtType; }