示例#1
0
 /// <summary>
 /// 获取分页记录集合
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         count  = tree.Count;
         values = isDesc ? tree.GetPageDesc(pageSize, currentPage) : tree.GetPage(pageSize, currentPage);
     }
     finally
     {
         wait.Set();
     }
 }
 /// <summary>
 /// 获取分页记录集合
 /// </summary>
 /// <param name="connection"></param>
 internal override Threading.LinkQueueTaskNode RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         count  = tree.Count;
         values = isDesc ? tree.GetPageDesc(pageSize, currentPage) : tree.GetPage(pageSize, currentPage);
     }
     finally
     {
         wait.Set();
     }
     return(LinkNext);
 }
 /// <summary>
 /// 获取分页记录集合
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         Value.Key   = isDesc ? tree.GetPageDesc(pageSize, currentPage) : tree.GetPage(pageSize, currentPage);
         Value.Value = tree.Count;
     }
     finally
     {
         if (System.Threading.Interlocked.CompareExchange(ref continuation, Pub.EmptyAction, null) != null)
         {
             new Task(continuation).Start();
         }
     }
 }
示例#4
0
 /// <summary>
 /// 获取分页记录集合
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         Value.Key   = isDesc ? tree.GetPageDesc(pageSize, currentPage) : tree.GetPage(pageSize, currentPage);
         Value.Value = tree.Count;
         IsCompleted = true;
     }
     finally
     {
         if (continuation != null || System.Threading.Interlocked.CompareExchange(ref continuation, Common.EmptyAction, null) != null)
         {
             continuation();
         }
     }
 }