public SecurityAccount GetAccount(IdentityReference ident)
        {
            SecurityAccount ret = null;

            lock (_lock)
            {
                if (accountCache.TryGetValue(ident.Value, out ret))
                {
                    Utils.Free(ident);
                    return(ret);
                }
            }

            SecurityAccount created = factory(this, ident);

            lock (_lock)
            {
                if (accountCache.TryGetValue(ident.Value, out ret))
                {
                    Utils.Free(ident);
                    Utils.Free(created);
                    return(ret);
                }
                accountList = null;
                accountCache.Add(created.NTAccount.Value, created);
                accountCache.Add(created.Sid.Value, created);
            }
            return(created);
        }
        public SecurityAccount GetAccount(String name)
        {
            SecurityAccount ret = null;

            lock (_lock)
            {
                if (accountCache.TryGetValue(name, out ret))
                {
                    return(ret);
                }
            }
            return(null);
        }