예제 #1
0
        /// <summary>
        /// Create a new CrawlQueue object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="groupId">Initial value of the GroupId property.</param>
        public static CrawlQueue CreateCrawlQueue(global::System.Int32 id, global::System.Int32 groupId)
        {
            CrawlQueue crawlQueue = new CrawlQueue();

            crawlQueue.Id      = id;
            crawlQueue.GroupId = groupId;
            return(crawlQueue);
        }
예제 #2
0
        public CrawlerQueueEntry Pop()
        {
            return(AspectF.Define.
                   WriteLock(m_CrawlHistoryLock).
                   Return <CrawlerQueueEntry, NCrawlerEntitiesDbServices>(e =>
            {
                CrawlQueue result = e.CrawlQueue.FirstOrDefault(q => q.GroupId == m_GroupId);
                if (result.IsNull())
                {
                    return null;
                }

                e.DeleteObject(result);
                e.SaveChanges();
                return result.SerializedData.FromBinary <CrawlerQueueEntry>();
            }));
        }
예제 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CrawlQueue EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCrawlQueue(CrawlQueue crawlQueue)
 {
     base.AddObject("CrawlQueue", crawlQueue);
 }
예제 #4
0
 /// <summary>
 /// Create a new CrawlQueue object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="groupId">Initial value of the GroupId property.</param>
 public static CrawlQueue CreateCrawlQueue(global::System.Int32 id, global::System.Int32 groupId)
 {
     CrawlQueue crawlQueue = new CrawlQueue();
     crawlQueue.Id = id;
     crawlQueue.GroupId = groupId;
     return crawlQueue;
 }
예제 #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CrawlQueue EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCrawlQueue(CrawlQueue crawlQueue)
 {
     base.AddObject("CrawlQueue", crawlQueue);
 }