Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 protected sealed internal override bool TryGetValue(string propertyName, out object propertyValue)
 {
     propertyValue = _values[_hash.ComputeHash(propertyName)];
     return(propertyValue != null);
 }