Beispiel #1
0
        public virtual IReadOnlyList <IOnlineClient> GetAllByContext([NotNull] OnlineClientContext context)
        {
            Check.NotNull(context, nameof(context));

            return(GetAllClients()
                   .Where(c => c.TenantId == context.TenantId && c.UserId.Equals(context.UserId))
                   .ToImmutableList());
        }
 public static bool IsOnline(
     [NotNull] this IOnlineClientManager onlineClientManager,
     [NotNull] OnlineClientContext context)
 {
     return(onlineClientManager.GetAllByContext(context).Any());
 }