Exemple #1
0
        private Participant Get(string key, ClockCache <string, Participant> cache, Func <string, Participant> lookupFunc)
        {
            Participant retval;

            if (!cache.TryGetValue(key, out retval))
            {
                var id = lookupFunc(key);
                if (id != null)
                {
                    retval = id;
                    CacheIdentity(id, key);
                }
            }

            return(retval);
        }
Exemple #2
0
 public IdentityCache()
 {
     m_identitiesByInput = new ClockCache <string, Participant>(MaximumSize);
     m_identitiesByAlias = new ClockCache <string, IEnumerable <Participant> >(MaximumSize);
 }