Exemple #1
0
 public void AddPoints(int code, [FromBody] PointsVote vote)
 {
     if (DatabaseContext.Active.Sessions.TryGetValue(code, out AdminInstance admin))
     {
         ThreadPool.QueueUserWorkItem(o => admin.AddClientInput(vote));
     }
 }
Exemple #2
0
        public void AddClientVote(PointsVote vote)
        {
            lock (ThreadLock)
            {
                vote.Index = Votes.Count;
                Votes.Add(vote);
                RecountVotes();
            }

            EventStream();
        }