Exemplo n.º 1
0
 public static bool NameExist(Shadow shadow)
 {
     foreach (var pair in _dict)
     {
         foreach (var s in pair.Value)
         {
             if (s.ID == shadow.ID && s.Variance == shadow.Variance)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 static void AddToDict(Shadow shadow, bool overwrite = false)
 {
     if (!_dict.ContainsKey(shadow.Hash))
     {
         _dict[shadow.Hash] = new List <Shadow>();
     }
     if (overwrite)
     {
         foreach (var pair in _dict.ToArray())
         {
             pair.Value.RemoveAll(u => u.ID == shadow.ID && u.Variance == shadow.Variance);
         }
         _dict[shadow.Hash].Clear();
     }
     _dict[shadow.Hash].Add(shadow);
     if (shadow.Variance == 'f')
     {
         _genderdiff.Add(shadow.ID);
     }
 }
Exemplo n.º 3
0
 public static Shadow[] Find(Shadow shadow)
 {
     return(Find(shadow.Hash));
 }