//public static IEnumerable<ScopeClientGroupLocate> GetLocatesExcept(IReadOnlyList<ScopeClientGroupLocate> excludedLocates)
        //{
        //    var query = QueryLocates();
        //    return query.Where(x => x.GetLocateClientKey())
        //    //return repository.Query()
        //    //    .Where(x => x.ClientType == ClientType.MainScreen
        //    //                && (string.IsNullOrEmpty(ScopeContext.Current.ScopeId) ?
        //    //                    x.ScopeId == null : x.ScopeId == ScopeContext.Current.ScopeId))
        //    //    .Select(x => x.ClientId).ToList();
        //}


        public static bool SameLocateKey(this IScopeClientGroupLocate locate, IScopeClientGroupLocate locate2)
        {
            if (locate == null || locate2 == null)
            {
                return(false);
            }
            return(locate.GetLocateClientKey().Equals(locate2.GetLocateClientKey(), StringComparison.OrdinalIgnoreCase));
        }
        //T All { get; }
        //T AllExcept(IReadOnlyList<string> excludedConnectionIds);
        //T Group(string groupName);
        //T GroupExcept(string groupName, IReadOnlyList<string> excludedConnectionIds);
        //T Groups(IReadOnlyList<string> groupNames);

        //OK methods
        //T Client(string connectionId);
        //T Clients(IReadOnlyList<string> connectionIds);
        //T User(string userId);
        //T Users(IReadOnlyList<string> userIds);


        //T Client(string connectionId);
        //T Clients(IReadOnlyList<string> connectionIds);

        public static string GetLocateClientKey(this IScopeClientGroupLocate locate)
        {
            if (locate == null)
            {
                throw new ArgumentNullException(nameof(locate));
            }
            return(string.Format("{0}.{1}.{2}", locate.ScopeId, locate.Group, locate.ClientId));
        }