Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IEnumerable<SomeObject> Get()
- {
- _lock.EnterReadLock();
- try
- {
- foreach (var item in _dictionary)
- {
- yield return new SomeObject(item.Key, item.Value);
- }
- }
- finally
- {
- _lock.ExitReadLock();
- }
- }
Add Comment
Please, Sign In to add comment