Exemplo n.º 1
0
        public List <ClientState> GetStates(params LiveState[] states)
        {
            if (null != ClientStates && ClientStates.Any() && states.Length > 0)
            {
                return(ClientStates.Where(x => states.Contains(x.Status)).ToList());
            }

            return(new List <ClientState>());
        }
Exemplo n.º 2
0
 public bool IsInState(params LiveState[] states)
 {
     if (null != ClientStates && ClientStates.Any() && states.Length > 0)
     {
         var found = ClientStates.Where(x => states.Contains(x.Status)).ToList();
         return(found.Count == states.Length);
     }
     return(false);
 }
Exemplo n.º 3
0
        public bool IsInAnyState(Guid indexId, params LiveState[] states)
        {
            if (null != ClientStates && ClientStates.Any(x => null != x.IndexClientId && x.IndexClientId == indexId) &&
                states.Length > 0)
            {
                var found = ClientStates.Where(x => states.Contains(x.Status) && x.IndexClientId == indexId).ToList();
                return(found.Count > 0);
            }

            return(false);
        }