示例#1
0
        public bool Contains(Hash hash)
        {
            if (_blocksManager.Contains(hash))
            {
                return(true);
            }

            lock (_lockObject)
            {
                if (_contentInfoManager.Contains(hash))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        public bool Contains(Hash hash)
        {
            if (_blocksManager.Contains(hash))
            {
                return(true);
            }

            using (_lockManager.ReadLock())
            {
                if (_contentInfoManager.Contains(hash))
                {
                    return(true);
                }
            }

            return(false);
        }