Skip to content

Instantly share code, notes, and snippets.

@ivanpaulovich
Created June 23, 2018 18:27
Show Gist options
  • Save ivanpaulovich/a758d732df2f85f34abb1f6b9e01f007 to your computer and use it in GitHub Desktop.
Save ivanpaulovich/a758d732df2f85f34abb1f6b9e01f007 to your computer and use it in GitHub Desktop.
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