public bool GetProperty(EnumTokenProperties key, out int val) { val = -1; if (Properties.ContainsKey(key)) { val = (int)Properties[key]; return(true); } //throw new TokenAccessException(this, "Failed on accessing property: " + Enum.GetName(typeof(EnumTokenProperties), key)); return(false); }
public bool AddProperty(EnumTokenProperties key, Int64 val) { if (!Properties.ContainsKey(key)) { //Perhaps add some key/value checking here Properties.Add(key, val); return(true); } //Invalid Property Exception return(false); }