Created
June 23, 2018 18:27
-
-
Save ivanpaulovich/a758d732df2f85f34abb1f6b9e01f007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class AccountCollection | |
{ | |
private readonly IList<Guid> _accountIds; | |
public AccountCollection() | |
{ | |
_accountIds = new List<Guid>(); | |
} | |
public IReadOnlyCollection<Guid> GetAccountIds() | |
{ | |
IReadOnlyCollection<Guid> accountIds = new ReadOnlyCollection<Guid>(_accountIds); | |
return accountIds; | |
} | |
public void Add(Guid accountId) | |
{ | |
_accountIds.Add(accountId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment