本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}