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());
        }
コード例 #2
0
 public static bool IsOnline(
     [NotNull] this IOnlineClientManager onlineClientManager,
     [NotNull] OnlineClientContext context)
 {
     return(onlineClientManager.GetAllByContext(context).Any());
 }