コード例 #1
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);
        }
コード例 #2
0
ファイル: UserRepository.cs プロジェクト: fazueu/cloudscribe
        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;

        }
コード例 #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);
        }