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


C# IDataReader.GetSafeBool方法代码示例

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


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

示例1: MapTags

        private Tags MapTags(IDataReader reader)
        {
            Tags p = new Tags();
            int startingIndex = 0;

            p.ID = reader.GetSafeInt32(startingIndex++);
            p.Name = reader.GetSafeString(startingIndex++);
            p.IsActive = reader.GetSafeBool(startingIndex++);

            return p;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:11,代码来源:TagsService.cs

示例2: MapQuickQuestion

        private static QuickQuestion MapQuickQuestion(IDataReader reader)
        {
            QuickQuestion qq = new QuickQuestion();
            int startingIndex = 0;

            qq.Id = reader.GetSafeInt32(startingIndex++);
            qq.Question = reader.GetSafeString(startingIndex++);
            qq.Status = reader.GetSafeInt32(startingIndex++);
            qq.DateAdded = reader.GetSafeDateTime(startingIndex++);
            qq.DateModified = reader.GetSafeDateTime(startingIndex++);
            qq.LanguageCode = reader.GetSafeString(startingIndex++);
            qq.CommentCount = reader.GetSafeInt32(startingIndex++);
            qq.BeenConverted = reader.GetSafeBool(startingIndex++);
            qq.ForumThreadId = reader.GetSafeInt32(startingIndex++);

            return qq;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:17,代码来源:QuickQuestionService.cs

示例3: MapTag

        private static Tags MapTag(IDataReader reader)
        {
            Tags t = new Tags();

            int startingIndex = 0;

            t.ID = reader.GetSafeInt32(startingIndex++);
            t.Name = reader.GetSafeString(startingIndex++);
            t.IsActive = reader.GetSafeBool(startingIndex++);
            t.blogID = reader.GetSafeInt32(startingIndex++);

            return t;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:13,代码来源:BlogService.cs

示例4: MapComment

        private static UserComment MapComment(IDataReader reader)
        {
            UserComment c = new UserComment();

            int startingIndex = 0;

            c.Id = reader.GetSafeInt32(startingIndex++);
            c.Comment = reader.GetSafeString(startingIndex++);
            c.CommentDate = reader.GetSafeDateTime(startingIndex++);
            c.IsFlagged = reader.GetSafeBool(startingIndex++);
            c.IsVisible = reader.GetSafeBool(startingIndex++);
            c.ParentId = reader.GetSafeInt32(startingIndex++, null);
            c.OwnerId = reader.GetSafeInt32(startingIndex++);
            c.OwnerType = reader.GetSafeEnum<CommentOwnerType>(startingIndex++);
            c.Deleted = reader.GetSafeBool(startingIndex++);
            c.DeletedDate = reader.GetSafeDateTime(startingIndex++);
            c.LanguageCode = reader.GetSafeString(startingIndex++);
            c.UpdateDate = reader.GetSafeDateTime(startingIndex++);
            c.Title = reader.GetSafeString(startingIndex++);
            c.Profile.Handle = reader.GetSafeString(startingIndex++);
            c.Profile.Avatar = reader.GetSafeString(startingIndex++);

            return c;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:24,代码来源:CommentsService.cs


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