Пример #1
0
 public JabbrListenerWorker(LogOnInfo logOnInfo, JabbRClient client, string[] rooms, IRobot robo, string userName)
 {
     _robo = robo;
     _rooms = rooms;
     _client = client;
     _logOnInfo = logOnInfo;
     _userName = userName;
 }
        private void CompleteSignin(LogOnInfo logOnInfo, TaskCompletionSource<UserViewModel> taskCompletionSource)
        {
            _logOnInfo = logOnInfo;

            User userinfo = _client.GetUserInfo().Result;
            UserViewModel userviewModel = _userService.GetUserViewModel(userinfo);
            userviewModel.IsCurrentUser = true;

            _roomService.JoinRooms(logOnInfo.Rooms);
            _roomService.GetRooms();

            CurrentUser = userviewModel;

            taskCompletionSource.TrySetResult(userviewModel);
        }