public async Task SendUserStateChangeToClients(IReadOnlyList <IOnlineClient> clients, UserIdentifier user, FriendshipState newState) { await Task.CompletedTask; }
public async Task SendUserStateChangeToClients(IReadOnlyList <IOnlineClient> clients, UserIdentifier user, FriendshipState newState) { foreach (var client in clients) { var signalRClient = GetSignalRClientOrNull(client); if (signalRClient == null) { continue; } await signalRClient.SendAsync("getUserStateChange", user, newState); } }
public Friendship(UserIdentifier user, UserIdentifier probableFriend, string probableFriendTenancyName, string probableFriendUserName, Guid?probableFriendProfilePictureId, FriendshipState state) { if (user == null) { throw new ArgumentNullException(nameof(user)); } if (probableFriend == null) { throw new ArgumentNullException(nameof(probableFriend)); } if (!Enum.IsDefined(typeof(FriendshipState), state)) { throw new Exception("Invalid FriendshipState value: " + state); } UserId = user.UserId; TenantId = user.TenantId; FriendUserId = probableFriend.UserId; FriendTenantId = probableFriend.TenantId; FriendTenancyName = probableFriendTenancyName; FriendUserName = probableFriendUserName; State = state; FriendProfilePictureId = probableFriendProfilePictureId; CreationTime = Clock.Now; }
public void SendUserStateChangeToClients(IReadOnlyList <IOnlineClient> clients, UserIdentifier user, FriendshipState newState) { }
public void SendUserStateChangeToClients(IReadOnlyList <IOnlineClient> clients, UserIdentifier user, FriendshipState newState) { foreach (var client in clients) { var signalRClient = GetSignalRClientOrNull(client); if (signalRClient == null) { continue; } signalRClient.getUserStateChange(user, newState); } }
public async Task <IEnumerable <Friendship> > GetByToUserAndStateAsync(Guid toUserId, FriendshipState state) { return(await entities.Where(friendship => friendship.ToUserId == toUserId && friendship.State == state) .Include(friendship => friendship.FromUser).ToListAsync()); }
public async Task SendUserStateChangeToClients(IReadOnlyList <IOnlineClient> clients, UserIdentifier user, FriendshipState newState) { foreach (var client in clients) { var signalRClient = GetSignalRClientOrNull(client); if (signalRClient == null) { continue; } _enumExtensionsAppService.GetEntityEnumOutputDtoList <FriendshipState>(); await signalRClient.SendAsync("getUserStateChange", user, newState.ToString()); } }