private PerfectHashStore(PerfectHash hash, IReadOnlyDictionary <string, object> properties) { _hash = hash; _values = new object[_hash.Size]; foreach (var property in properties) { var index = _hash.ComputeHash(property.Key); _values[index] = property.Value; } }
protected sealed internal override bool TryGetValue(string propertyName, out object propertyValue) { propertyValue = _values[_hash.ComputeHash(propertyName)]; return(propertyValue != null); }