// typed getters internal bool GetBoolProperty(string name) { var ret = GetProperty(IdentValue.Create(name)); if (ret == null) { return(false); } if (ret.DataType == DataTypes.Bool) { return(ret == BoolValue.True); } if (ret.DataType == DataTypes.Text) { return(ret.AsString.ToLower() == "true"); } if (ret.DataType == DataTypes.Number) { return((ret as NumberValue).Value != 0); } return(false); }
internal string GetStringProperty(string name) { var ret = GetProperty(IdentValue.Create(name)); return((ret == null) ? null : ret.AsString); }
internal int GetIntProperty(string name) { var ret = GetProperty(IdentValue.Create(name)); return((ret == null) ? 0 : (int)(ret as NumberValue).Value); }
internal TypedValue GetProperty(string name) { return(GetProperty(IdentValue.Create(name))); }
internal void SetProperty(string name, TypedValue value) { PropertyLookup[IdentValue.Create(name)] = value; }