public PrefValue <DateTime> GetDateTime(string key) { Init(); _lock.EnterReadLock(); var value = _map.ContainsKey(key) ? (DateTime?)DateTime.FromBinary((long)_map[key]) : null; var retval = new PrefValue <DateTime>(this, value, GetMeta(key)); _lock.ExitReadLock(); return(retval); }
internal PrefValue <T> GetStruct <T>(string key) where T : struct { Init(); _lock.EnterReadLock(); T?val = null; if (_map.ContainsKey(key)) { val = (T)_map[key]; } var retval = new PrefValue <T>(this, val, GetMeta(key)); _lock.ExitReadLock(); return(retval); }