Ejemplo n.º 1
0
        public async Task <List <IUserInfo> > GetByIPAddress(Guid siteGuid, string ipv4Address)
        {
            List <IUserInfo> userList = new List <IUserInfo>();

            using (DbDataReader reader = await dbUserLocation.GetUsersByIPAddress(siteGuid, ipv4Address))
            {
                while (reader.Read())
                {
                    UserInfo user = new UserInfo();
                    user.LoadFromReader(reader);
                    userList.Add(user);
                }
            }

            return(userList);
        }
Ejemplo n.º 2
0
        public async Task <List <IUserInfo> > GetByIPAddress(Guid siteGuid, string ipv4Address, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            List <IUserInfo> userList = new List <IUserInfo>();

            using (DbDataReader reader = await dbUserLocation.GetUsersByIPAddress(siteGuid, ipv4Address))
            {
                while (reader.Read())
                {
                    UserInfo user = new UserInfo();
                    user.LoadFromReader(reader);
                    userList.Add(user);
                }
            }

            return(userList);
        }
Ejemplo n.º 3
0
        public async Task <List <IUserInfo> > GetByIPAddress(Guid siteGuid, string ipv4Address)
        {
            List <IUserInfo> userList = new List <IUserInfo>();

            if (multiTenantOptions.UseRelatedSitesMode)
            {
                siteGuid = Guid.Empty;
            }

            using (DbDataReader reader = await dbUserLocation.GetUsersByIPAddress(siteGuid, ipv4Address))
            {
                while (reader.Read())
                {
                    UserInfo user = new UserInfo();
                    user.LoadFromReader(reader);
                    userList.Add(user);
                }
            }

            return(userList);
        }