예제 #1
0
        public Hash[] ToArray()
        {
            lock (_lockObject)
            {
                var hashSet = new HashSet <Hash>();
                hashSet.UnionWith(_blocksManager.ToArray());
                hashSet.UnionWith(_contentInfoManager.GetHashes());

                return(hashSet.ToArray());
            }
        }
예제 #2
0
        public Hash[] ToArray()
        {
            using (_lockManager.ReadLock())
            {
                var hashSet = new HashSet <Hash>();
                hashSet.UnionWith(_blocksManager.ToArray());
                hashSet.UnionWith(_contentInfoManager.GetHashes());

                return(hashSet.ToArray());
            }
        }