private async void UserClient_OnUserJoinReceived(object sender, ChatUserJoinPacketModel userJoin) { await this.userJoinLeaveEventsSemaphore.WaitAndRelease(() => { if (!string.IsNullOrEmpty(userJoin.UserLogin)) { this.userJoinEvents.Add(userJoin.UserLogin); } return(Task.FromResult(0)); }); }
private static void Chat_OnUserJoinReceived(object sender, ChatUserJoinPacketModel packet) { System.Console.WriteLine(string.Format("User Joined: {0}", packet.UserLogin)); }