public override async Task OnConnectedAsync() { var user = await _usersService.GetUserAsync(Context.UserIdentifier); var userSubscription = new UserSubscription(Context.UserIdentifier); await _subscriptionService.SubscribeAsync(Context.ConnectionId, userSubscription); var settingsSubscription = new SettingsSubscription(Context.UserIdentifier); await _subscriptionService.SubscribeAsync(Context.ConnectionId, settingsSubscription); var readyMethod = ReadyMethod.WithArgs(user.Id, user.Name, user.Tag, (int)user.Settings.Theme); await _publisherService.PublishAsync(Context.ConnectionId, readyMethod); await _userConnectionService.AddConnectionAsync(Context.UserIdentifier, Context.ConnectionId); await base.OnConnectedAsync(); }