/// <summary> /// 获取索引值 /// </summary> /// <param name="name">索引名称</param> /// <returns>object</returns> public object this[string name] { get { VariableElement val = GetElement(name); if (val != null) { return(val.Value); } return(null); } }
/// <summary> /// 获取结果类型 /// </summary> /// <param name="name">索引名称</param> /// <returns>Type</returns> public Type GetType(string name) { VariableElement val = GetElement(name); if (val != null) { if (val.Type != null) { return(val.Type); } if (val.Value != null) { return(val.Value.GetType()); } } return(null); }
/// <inheritdoc /> public Type GetType(string key) { VariableElement val = GetElement(key); if (val != null) { if (val.Type != null) { return(val.Type); } if (val.Value != null) { return(val.Value.GetType()); } } if (Parent != null) { return(Parent.GetType(key)); } return(null); }
/// <inheritdoc /> public void SetElement(string key, VariableElement element) { this.dic[key] = element; }