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