예제 #1
0
 public StoreBoundTwitchUser(
     TwitchUserStore store,
     ITwitchUser user)
 {
     this.store = store;
     this.user  = user;
 }
예제 #2
0
    public ITwitchUser Store(ITwitchUser item)
    {
        lock (Mutex)
        {
            var index = this.Items.FindIndex(x => x.Equals(item) || x.GetHashCode() == item.GetHashCode() && item.GetType() == x.GetType());
            if (index != -1)
            {
                this.Items[index] = item;
            }
            else
            {
                this.Items.Add(item);
            }
        }

        return(item);
    }