20 lines
403 B
C#
20 lines
403 B
C#
using HackerNet.Domain;
|
|
|
|
namespace HackerNet.Infrastructure.Repositories.Memory;
|
|
|
|
public class MemoryCommentRepository : ICommentRepository
|
|
{
|
|
private List<Comment> _comments;
|
|
|
|
internal List<Comment> Comments => _comments;
|
|
|
|
public MemoryCommentRepository(params Comment[] comments)
|
|
{
|
|
_comments = comments.ToList();
|
|
}
|
|
|
|
public void Add(Comment comment)
|
|
{
|
|
_comments.Add(comment);
|
|
}
|
|
} |