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

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

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

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

            return(false);
        }