public Hash[] ToArray() { lock (_lockObject) { var hashSet = new HashSet <Hash>(); hashSet.UnionWith(_blocksManager.ToArray()); hashSet.UnionWith(_contentInfoManager.GetHashes()); return(hashSet.ToArray()); } }
public Hash[] ToArray() { using (_lockManager.ReadLock()) { var hashSet = new HashSet <Hash>(); hashSet.UnionWith(_blocksManager.ToArray()); hashSet.UnionWith(_contentInfoManager.GetHashes()); return(hashSet.ToArray()); } }