Esempio n. 1
0
 public bool RaiseHand(Participant participant, Hand.EHandType handType)
 {
     lock (this.hands)
     {
         if (this.hands.IsEmpty(h => h.Participant == participant))
         {
             int idx = 0;
             for (; idx < this.hands.Count; ++idx)
             {
                 if (GetPrio(this.hands[idx].HandType) > GetPrio(handType))
                 {
                     break;
                 }
             }
             this.hands.Insert(idx, new Hand(participant, handType));
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
        private void RaiseHand(Hand.EHandType hand)
        {
            Participant participant = ConnectionMapping <Participant> .Instance[this.Context.ConnectionId];

            participant?.RaiseHand(hand);
        }
Esempio n. 3
0
 private static int GetPrio(Hand.EHandType handType) =>
 (int)handType;