當前位置: 首頁>>代碼示例>>C#>>正文


C# SqliteDataReader.Close方法代碼示例

本文整理匯總了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;
        }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:22,代碼來源:Statistics.cs

示例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;
        }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:23,代碼來源:SiteData.cs

示例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;
 }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:30,代碼來源:CommentData.cs

示例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;
        }
開發者ID:jango2015,項目名稱:LoachsMono,代碼行數:31,代碼來源:User.cs

示例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;
        }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:33,代碼來源:UserData.cs

示例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;
        }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:39,代碼來源:Post.cs

示例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;
        }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:34,代碼來源:Tag.cs

示例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;
        }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:28,代碼來源:TagData.cs

示例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;
        }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:33,代碼來源:LinkData.cs

示例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;
        }
開發者ID:robotbird,項目名稱:jqpress-aspx,代碼行數:28,代碼來源:CategoryData.cs

示例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;
        }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:31,代碼來源:Link.cs

示例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;
 }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:28,代碼來源:Comment.cs

示例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;
        }
開發者ID:azraelrabbit,項目名稱:LoachsMono,代碼行數:25,代碼來源:Category.cs


注:本文中的Mono.Data.Sqlite.SqliteDataReader.Close方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。