Example #1
0
 /// <summary>
 ///   Add a Habbo into the cache.
 /// </summary>
 /// <param name = "theHabbo">The Habbo to cache.</param>
 private void CacheHabbo(Habbo theHabbo)
 {
     lock (this)
     {
         // Cache the Habbo.
         _habboCache.Add(theHabbo.GetID(), new WeakReference(theHabbo));
         // Cache the Username-ID.
         _usernameIDCache.Add(theHabbo.GetUsername(), theHabbo.GetID());
     }
 }
Example #2
0
 /// <summary>
 ///   Add a Habbo into the cache.
 /// </summary>
 /// <param name = "theHabbo">The Habbo to cache.</param>
 private void CacheHabbo(Habbo theHabbo)
 {
     lock (this)
     {
         // Cache the Habbo.
         _habboCache.Add(theHabbo.GetID(), new WeakReference(theHabbo));
         // Cache the Username-ID.
         _usernameIDCache.Add(theHabbo.GetUsername(), theHabbo.GetID());
     }
 }