本文整理汇总了C#中Mono.Data.Sqlite.SqliteDataReader.Close方法的典型用法代码示例。如果您正苦于以下问题:C# SqliteDataReader.Close方法的具体用法?C# SqliteDataReader.Close怎么用?C# SqliteDataReader.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Data.Sqlite.SqliteDataReader
的用法示例。
在下文中一共展示了SqliteDataReader.Close方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataReaderToList
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">OleDbDataReader</param>
/// <returns>TermInfo</returns>
private static List<StatisticsInfo> DataReaderToList(SqliteDataReader read)
{
List<StatisticsInfo> list = new List<StatisticsInfo>();
while (read.Read())
{
StatisticsInfo _site = new StatisticsInfo();
_site.PostCount = Convert.ToInt32(read["PostCount"]);
_site.CommentCount = Convert.ToInt32(read["CommentCount"]);
_site.VisitCount = Convert.ToInt32(read["VisitCount"]);
_site.TagCount = Convert.ToInt32(read["TagCount"]);
list.Add(_site);
}
read.Close();
return list;
}
示例2: DataReaderToListSite
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">SqliteDataReader</param>
/// <returns>TermInfo</returns>
private static List<StatisticsInfo> DataReaderToListSite(SqliteDataReader read)
{
var list = new List<StatisticsInfo>();
while (read.Read())
{
var site = new StatisticsInfo
{
PostCount = Convert.ToInt32(read["PostCount"]),
CommentCount = Convert.ToInt32(read["CommentCount"]),
VisitCount = Convert.ToInt32(read["VisitCount"]),
TagCount = Convert.ToInt32(read["TagCount"])
};
list.Add(site);
}
read.Close();
return list;
}
示例3: DataReaderToCommentList
/// <summary>
/// 数据转换
/// </summary>
/// <param name="read"></param>
/// <returns></returns>
private static List<CommentInfo> DataReaderToCommentList(SqliteDataReader read)
{
var list = new List<CommentInfo>();
while (read.Read())
{
var comment = new CommentInfo
{
CommentId = Convert.ToInt32(read["CommentId"]),
ParentId = Convert.ToInt32(read["ParentId"]),
PostId = Convert.ToInt32(read["PostId"]),
UserId = Convert.ToInt32(read["UserId"]),
Author = Convert.ToString(read["Author"]),
Email = Convert.ToString(read["Email"]),
AuthorUrl = Convert.ToString(read["AuthorUrl"]),
Contents = Convert.ToString(read["Contents"]),
EmailNotify = Convert.ToInt32(read["EmailNotify"]),
IpAddress = Convert.ToString(read["IpAddress"]),
CreateTime = Convert.ToDateTime(read["CreateTime"]),
Approved = Convert.ToInt32(read["Approved"])
};
list.Add(comment);
}
read.Close();
return list;
}
示例4: DataReaderToUserList
/// <summary>
/// 数据转换
/// </summary>
/// <param name="read"></param>
/// <returns></returns>
private List<UserInfo> DataReaderToUserList(SqliteDataReader read)
{
List<UserInfo> list = new List<UserInfo>();
while (read.Read())
{
UserInfo _userinfo = new UserInfo();
_userinfo.UserId = Convert.ToInt32(read["UserId"]);
_userinfo.Type = Convert.ToInt32(read["Type"]);
_userinfo.UserName = Convert.ToString(read["UserName"]);
_userinfo.Name = Convert.ToString(read["Name"]);
_userinfo.Password = Convert.ToString(read["Password"]);
_userinfo.Email = Convert.ToString(read["Email"]);
_userinfo.SiteUrl = Convert.ToString(read["SiteUrl"]);
_userinfo.AvatarUrl = Convert.ToString(read["AvatarUrl"]);
_userinfo.Description = Convert.ToString(read["Description"]);
_userinfo.Displayorder = Convert.ToInt32(read["Displayorder"]);
_userinfo.Status = Convert.ToInt32(read["Status"]);
_userinfo.PostCount = Convert.ToInt32(read["PostCount"]);
_userinfo.CommentCount = Convert.ToInt32(read["CommentCount"]);
_userinfo.CreateDate = Convert.ToDateTime(read["CreateDate"]);
list.Add(_userinfo);
}
read.Close();
return list;
}
示例5: DataReaderToUserList
/// <summary>
/// 数据转换
/// </summary>
/// <param name="read"></param>
/// <returns></returns>
private static List<UserInfo> DataReaderToUserList(SqliteDataReader read)
{
var list = new List<UserInfo>();
while (read.Read())
{
var userinfo = new UserInfo
{
UserId = Convert.ToInt32(read["UserId"]),
UserType = Convert.ToInt32(read["UserType"]),
UserName = Convert.ToString(read["UserName"]),
NickName = Convert.ToString(read["NickName"]),
Password = Convert.ToString(read["Password"]),
Email = Convert.ToString(read["Email"]),
SiteUrl = Convert.ToString(read["SiteUrl"]),
AvatarUrl = Convert.ToString(read["AvatarUrl"]),
Description = Convert.ToString(read["Description"]),
SortNum = Convert.ToInt32(read["SortNum"]),
Status = Convert.ToInt32(read["Status"]),
PostCount = Convert.ToInt32(read["PostCount"]),
CommentCount = Convert.ToInt32(read["CommentCount"]),
CreateTime = Convert.ToDateTime(read["CreateTime"])
};
list.Add(userinfo);
}
read.Close();
return list;
}
示例6: DataReaderToCommentList
/// <summary>
/// 数据转换
/// </summary>
/// <param name="read"></param>
/// <returns></returns>
private List<PostInfo> DataReaderToCommentList(SqliteDataReader read)
{
List<PostInfo> list = new List<PostInfo>();
while (read.Read())
{
PostInfo postinfo = new PostInfo();
postinfo.PostId = StringHelper.ObjectToInt(read["PostId"]);
postinfo.CategoryId = StringHelper.ObjectToInt(read["CategoryId"]);
postinfo.Title = Convert.ToString(read["Title"]);
postinfo.Summary = Convert.ToString(read["Summary"]);
postinfo.Content = Convert.ToString(read["Content"]);
postinfo.Slug = Convert.ToString(read["Slug"]);
postinfo.UserId = StringHelper.ObjectToInt(read["UserId"]);
postinfo.CommentStatus = StringHelper.ObjectToInt(read["CommentStatus"]);
postinfo.CommentCount = StringHelper.ObjectToInt(read["CommentCount"]);
postinfo.ViewCount = StringHelper.ObjectToInt(read["ViewCount"]);
postinfo.Tag = Convert.ToString(read["Tag"]);
postinfo.UrlFormat = StringHelper.ObjectToInt((read["UrlFormat"]));
postinfo.Template = Convert.ToString(read["Template"]);
postinfo.Recommend = StringHelper.ObjectToInt(read["Recommend"]);
postinfo.Status = StringHelper.ObjectToInt(read["Status"]);
postinfo.TopStatus = StringHelper.ObjectToInt(read["TopStatus"]);
postinfo.HideStatus = StringHelper.ObjectToInt(read["HideStatus"]);
postinfo.CreateDate = Convert.ToDateTime(read["CreateDate"]);
postinfo.UpdateDate = Convert.ToDateTime(read["UpdateDate"]);
list.Add(postinfo);
}
read.Close();
return list;
}
示例7: DataReaderToList
//public int GetCount(int tagId, bool incUncategorized)
//{
// string cmdText = "select count(1) from [loachs_posts] where [tag] like '%" + tagId + "}%'";
// if (!incUncategorized)
// {
// cmdText = "select count(1) from [loachs_posts] where [categoryid]>0 and [tag] like '%" + tagId + "}%'";
// }
// return Convert.ToInt32(SqliteDbHelper.ExecuteScalar(cmdText));
//}
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">OleDbDataReader</param>
/// <returns>TagInfo</returns>
private static List<TagInfo> DataReaderToList(SqliteDataReader read)
{
List<TagInfo> list = new List<TagInfo>();
while (read.Read())
{
TagInfo tag = new TagInfo();
tag.TagId = Convert.ToInt32(read["termid"]);
// tag.Type = Convert.ToInt32(read["Type"]);
tag.Name = Convert.ToString(read["Name"]);
tag.Slug = Convert.ToString(read["Slug"]);
tag.Description = Convert.ToString(read["Description"]);
tag.Displayorder = Convert.ToInt32(read["Displayorder"]);
tag.Count = Convert.ToInt32(read["Count"]);
tag.CreateDate = Convert.ToDateTime(read["CreateDate"]);
list.Add(tag);
}
read.Close();
return list;
}
示例8: DataReaderToListTag
/// <summary>
/// 转换实体
/// </summary>
/// <param CateName="read">SqliteDataReader</param>
/// <param name="read"></param>
/// <returns>TagInfo</returns>
private static List<TagInfo> DataReaderToListTag(SqliteDataReader read)
{
var list = new List<TagInfo>();
while (read.Read())
{
var tag = new TagInfo
{
TagId = Convert.ToInt32(read["categoryid"]),
CateName = Convert.ToString(read["CateName"]),
Slug = Convert.ToString(read["Slug"]),
Description = Convert.ToString(read["Description"]),
SortNum = Convert.ToInt32(read["SortNum"]),
PostCount = Convert.ToInt32(read["PostCount"]),
CreateTime = Convert.ToDateTime(read["CreateTime"])
};
// tag.Type = Convert.ToInt32(read["Type"]);
list.Add(tag);
}
read.Close();
return list;
}
示例9: DataReaderToListLink
/// <summary>
/// 转换实体
/// </summary>
/// <param LinkName="read">SqliteDataReader</param>
/// <param name="read"></param>
/// <returns>LinkInfo</returns>
private static List<LinkInfo> DataReaderToListLink(SqliteDataReader read)
{
var list = new List<LinkInfo>();
while (read.Read())
{
var link = new LinkInfo
{
LinkId = Convert.ToInt32(read["Linkid"]),
Type = Convert.ToInt32(read["Type"]),
LinkName = Convert.ToString(read["LinkName"]),
LinkUrl = Convert.ToString(read["LinkUrl"]),
Target = Convert.ToString(read["Target"]),
Description = Convert.ToString(read["Description"]),
SortNum = Convert.ToInt32(read["SortNum"]),
Status = Convert.ToInt32(read["Status"]),
CreateTime = Convert.ToDateTime(read["CreateTime"])
};
if (read["Position"] != DBNull.Value)
{
link.Position = Convert.ToInt32(read["Position"]);
}
list.Add(link);
}
read.Close();
return list;
}
示例10: DataReaderToListCate
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">SqliteDataReader</param>
/// <returns>CategoryInfo</returns>
private static List<CategoryInfo> DataReaderToListCate(SqliteDataReader read)
{
var list = new List<CategoryInfo>();
while (read.Read())
{
var category = new CategoryInfo
{
CategoryId = Convert.ToInt32(read["categoryid"]),
ParentId = Jqpress.Framework.Utils.TypeConverter.ObjectToInt(read["ParentId"],0),
CateName = Convert.ToString(read["CateName"]),
Slug = Convert.ToString(read["Slug"]),
Description = Convert.ToString(read["Description"]),
SortNum = Convert.ToInt32(read["SortNum"]),
PostCount = Convert.ToInt32(read["PostCount"]),
CreateTime = Convert.ToDateTime(read["CreateTime"])
};
// category.Type = Convert.ToInt32(read["Type"]);
list.Add(category);
}
read.Close();
return list;
}
示例11: DataReaderToList
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">OleDbDataReader</param>
/// <returns>LinkInfo</returns>
private static List<LinkInfo> DataReaderToList(SqliteDataReader read)
{
List<LinkInfo> list = new List<LinkInfo>();
while (read.Read())
{
LinkInfo link = new LinkInfo();
link.LinkId = Convert.ToInt32(read["Linkid"]);
link.Type = Convert.ToInt32(read["Type"]);
link.Name = Convert.ToString(read["Name"]);
link.Href = Convert.ToString(read["Href"]);
if (read["Position"] != DBNull.Value)
{
link.Position = Convert.ToInt32(read["Position"]);
}
link.Target = Convert.ToString(read["Target"]);
link.Description = Convert.ToString(read["Description"]);
link.Displayorder = Convert.ToInt32(read["Displayorder"]);
link.Status = Convert.ToInt32(read["Status"]);
link.CreateDate = Convert.ToDateTime(read["CreateDate"]);
list.Add(link);
}
read.Close();
return list;
}
示例12: DataReaderToCommentList
/// <summary>
/// 数据转换
/// </summary>
/// <param name="read"></param>
/// <returns></returns>
private List<CommentInfo> DataReaderToCommentList(SqliteDataReader read)
{
List<CommentInfo> list = new List<CommentInfo>();
while (read.Read())
{
CommentInfo comment = new CommentInfo();
comment.CommentId = Convert.ToInt32(read["CommentId"]);
comment.ParentId = Convert.ToInt32(read["ParentId"]);
comment.PostId = Convert.ToInt32(read["PostId"]);
comment.UserId = Convert.ToInt32(read["UserId"]);
comment.Name = Convert.ToString(read["Name"]);
comment.Email = Convert.ToString(read["Email"]);
comment.SiteUrl = Convert.ToString(read["SiteUrl"]);
comment.Content = Convert.ToString(read["Content"]);
comment.EmailNotify = Convert.ToInt32(read["EmailNotify"]);
comment.IpAddress = Convert.ToString(read["IpAddress"]);
comment.CreateDate = Convert.ToDateTime(read["CreateDate"]);
comment.Approved = Convert.ToInt32(read["Approved"]);
list.Add(comment);
}
read.Close();
return list;
}
示例13: DataReaderToList
/// <summary>
/// 转换实体
/// </summary>
/// <param name="read">SqliteDataReader</param>
/// <returns>CategoryInfo</returns>
private static List<CategoryInfo> DataReaderToList(SqliteDataReader read)
{
List<CategoryInfo> list = new List<CategoryInfo>();
while (read.Read())
{
CategoryInfo category = new CategoryInfo();
category.CategoryId = Convert.ToInt32(read["termid"]);
// category.Type = Convert.ToInt32(read["Type"]);
category.Name = Convert.ToString(read["Name"]);
category.Slug = Convert.ToString(read["Slug"]);
category.Description = Convert.ToString(read["Description"]);
category.Displayorder = Convert.ToInt32(read["Displayorder"]);
category.Count = Convert.ToInt32(read["Count"]);
category.CreateDate = Convert.ToDateTime(read["CreateDate"]);
list.Add(category);
}
read.Close();
return list;
}