forked from CommentViewerCollection/MultiCommentViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestUserStore.cs
More file actions
35 lines (31 loc) · 756 Bytes
/
TestUserStore.cs
File metadata and controls
35 lines (31 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Common;
using SitePlugin;
using System;
using System.Collections.Generic;
namespace TestSitePlugin
{
public class TestUserStore : IUserStore
{
public event EventHandler<IUser> UserAdded;
Dictionary<string, IUser> _dict = new Dictionary<string, IUser>();
public IEnumerable<IUser> GetAllUsers()
{
return _dict.Values;
}
public IUser GetUser(string userId)
{
if(!_dict.TryGetValue(userId, out IUser user))
{
user = new UserTest(userId);
_dict.Add(userId, user);
}
return user;
}
public void Init()
{
}
public void Save()
{
}
}
}