using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Lskj.Interface.Api { public class PropertyBase { private Dictionary properties = new Dictionary(); protected virtual object GetVal(string name, object defautVal = null) { object val; if (properties.ContainsKey(name) && (val = properties[name]) != null) { return val; } else { val = defautVal; properties[name] = val; return val; } } protected virtual void SetVal(string name, object val) { properties[name] = val; } } }