当前位置: 首页>>代码示例>>C#>>正文


C# SiteUser.LoadFromReader方法代码示例

本文整理汇总了C#中cloudscribe.Core.Models.SiteUser.LoadFromReader方法的典型用法代码示例。如果您正苦于以下问题:C# SiteUser.LoadFromReader方法的具体用法?C# SiteUser.LoadFromReader怎么用?C# SiteUser.LoadFromReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cloudscribe.Core.Models.SiteUser的用法示例。


在下文中一共展示了SiteUser.LoadFromReader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FetchByConfirmationGuid

        public async Task<ISiteUser> FetchByConfirmationGuid(int siteId, Guid confirmGuid)
        {  
            using (DbDataReader reader = await dbSiteUser.GetUserByRegistrationGuid(siteId, confirmGuid))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    if (user.SiteId == siteId) { return user; }

                }
            }

            return null;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:17,代码来源:UserRepository.cs

示例2: Fetch

        public async Task<ISiteUser> Fetch(int siteId, string email)
        { 
            using (DbDataReader reader = await dbSiteUser.GetSingleUser(siteId, email))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:17,代码来源:UserRepository.cs

示例3: GetUsersForClaim

        public async Task<IList<ISiteUser>> GetUsersForClaim(
            int siteId,
            string claimType, 
            string claimValue)
        {
            IList<ISiteUser> users = new List<ISiteUser>();

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(siteId, claimType, claimValue))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);

                }

            }

            return users;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:21,代码来源:UserRepository.cs

示例4: Fetch

        public async Task<ISiteUser> Fetch(
            int siteId, 
            string email, 
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbSiteUser.GetSingleUser(
                siteId, 
                email,
                cancellationToken))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:alfkonee,项目名称:cloudscribe,代码行数:24,代码来源:UserRepository.cs

示例5: FetchByLoginName

        public async Task<ISiteUser> FetchByLoginName(
            int siteId, 
            string userName, 
            bool allowEmailFallback, 
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbSiteUser.GetSingleUserByLoginName(
                siteId, 
                userName, 
                allowEmailFallback,
                cancellationToken))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:alfkonee,项目名称:cloudscribe,代码行数:26,代码来源:UserRepository.cs

示例6: GetUsersForClaim

        public async Task<IList<ISiteUser>> GetUsersForClaim(
            int siteId,
            string claimType,
            string claimValue,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            IList<ISiteUser> users = new List<ISiteUser>();

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(
                siteId, 
                claimType, 
                claimValue,
                cancellationToken))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);

                }

            }

            return users;
        }
开发者ID:alfkonee,项目名称:cloudscribe,代码行数:27,代码来源:UserRepository.cs

示例7: FetchByConfirmationGuid

        public async Task<ISiteUser> FetchByConfirmationGuid(int siteId, Guid confirmGuid)
        {
            if (multiTenantOptions.UseRelatedSitesMode) { siteId = multiTenantOptions.RelatedSiteId; }

            using (DbDataReader reader = dbSiteUser.GetUserByRegistrationGuid(siteId, confirmGuid))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    if (user.SiteId == siteId) { return user; }

                }
            }

            return null;
        }
开发者ID:okusnadi,项目名称:cloudscribe,代码行数:19,代码来源:UserRepository.cs

示例8: FetchByLoginName

        public async Task<ISiteUser> FetchByLoginName(int siteId, string userName, bool allowEmailFallback)
        {
            if (multiTenantOptions.UseRelatedSitesMode) { siteId = multiTenantOptions.RelatedSiteId; }

            using (DbDataReader reader = await dbSiteUser.GetSingleUserByLoginName(siteId, userName, allowEmailFallback))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:okusnadi,项目名称:cloudscribe,代码行数:19,代码来源:UserRepository.cs

示例9: GetUsersInRole

        public async Task<IList<ISiteUser>> GetUsersInRole(
            int siteId,
            string roleName,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            IList<ISiteUser> users = new List<ISiteUser>();

            ISiteRole role = await FetchRole(siteId, roleName);
            int roleId = -3;
            if (role != null)
            {
                roleId = role.RoleId;
            }

            using (DbDataReader reader = await dbRoles.GetUsersInRole(
                siteId, 
                roleId, 
                string.Empty, 
                1, 
                100000,
                cancellationToken))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);

                }

            }

            return users;
        }
开发者ID:alfkonee,项目名称:cloudscribe,代码行数:35,代码来源:UserRepository.cs

示例10: Fetch

        public async Task<ISiteUser> Fetch(int siteId, string email)
        {
            if (multiTenantOptions.UseRelatedSitesMode) { siteId = multiTenantOptions.RelatedSiteId; }

            using (DbDataReader reader = await dbSiteUser.GetSingleUser(siteId, email))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:okusnadi,项目名称:cloudscribe,代码行数:19,代码来源:UserRepository.cs

示例11: GetUsersForClaim

        public async Task<IList<ISiteUser>> GetUsersForClaim(
            int siteId,
            string claimType,
            string claimValue)
        {
            IList<ISiteUser> users = new List<ISiteUser>();

            if (multiTenantOptions.UseRelatedSitesMode) { siteId = multiTenantOptions.RelatedSiteId; }

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(siteId, claimType, claimValue))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);

                }

            }

            return users;
        }
开发者ID:okusnadi,项目名称:cloudscribe,代码行数:23,代码来源:UserRepository.cs

示例12: Fetch

        public async Task<ISiteUser> Fetch(int siteId, Guid userGuid, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();

            using (DbDataReader reader = dbSiteUser.GetSingleUser(userGuid))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    if (user.SiteId == siteId) { return user; }

                }
            }

            return null;
        }
开发者ID:ludev,项目名称:cloudscribe,代码行数:19,代码来源:UserRepository.cs

示例13: FetchByLoginName

        public async Task<ISiteUser> FetchByLoginName(int siteId, string userName, bool allowEmailFallback)
        {
            using (DbDataReader reader = await dbSiteUser.GetSingleUserByLoginName(siteId, userName, allowEmailFallback))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    return user;

                }
            }

            return null;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:17,代码来源:UserRepository.cs

示例14: FetchByConfirmationGuid

        public async Task<ISiteUser> FetchByConfirmationGuid(
            int siteId, 
            Guid confirmGuid, 
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbSiteUser.GetUserByRegistrationGuid(
                siteId, 
                confirmGuid,
                cancellationToken))
            {
                if (reader.Read())
                {
                    SiteUser user = new SiteUser();

                    user.LoadFromReader(reader);

                    if (user.SiteId == siteId) { return user; }

                }
            }

            return null;
        }
开发者ID:alfkonee,项目名称:cloudscribe,代码行数:24,代码来源:UserRepository.cs

示例15: GetUsersInRole

        public async Task<IList<ISiteUser>> GetUsersInRole(
            int siteId,
            string roleName)
        {
            IList<ISiteUser> users = new List<ISiteUser>();

            ISiteRole role = await FetchRole(siteId, roleName);
            int roleId = -3;
            if(role != null)
            {
                roleId = role.RoleId;
            }

            using (DbDataReader reader = await dbRoles.GetUsersInRole(siteId, roleId, string.Empty, 1, 100000))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);

                }

            }

            return users;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:27,代码来源:UserRepository.cs


注:本文中的cloudscribe.Core.Models.SiteUser.LoadFromReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。