示例#1
0
        /// <summary>
        /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
        /// </summary>
        /// <param name="foreachRBF">This delegate is called for every RBF.</param>
        /// <param name="startNode">The crawler will begin searching for RBF files from this node.</param>
        /// <param name="advanceProgressCallback">Called everytime a file has been processed.</param>
        /// <exception cref="ArgumentNullException"><paramref name="foreachRBF" /> is <c>null</c>.</exception>
        public RBFCrawler(CrawlerCallback foreachRBF, FSNodeDir startNode, Action advanceProgressCallback)
        {
            if (foreachRBF == null)
            {
                throw new ArgumentNullException("foreachRBF");
            }
            if (startNode == null)
            {
                throw new ArgumentNullException("startNode");
            }

            m_foreachRBF = foreachRBF;
            m_startNode  = startNode;
            m_advanceProgressCallback = advanceProgressCallback;
            UseDedicatedThread        = true;
        }
示例#2
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="pathOfStartNode">The crawler will begin searching for RBF files from this node.</param>
 /// <param name="advanceProgressCallback">Called everytime a file has been processed.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, string pathOfStartNode, Action advanceProgressCallback)
     : this(foreachRBF, (FSNodeDir)(string.IsNullOrEmpty(pathOfStartNode) ? FileManager.AttribTree.RootNode : FileManager.AttribTree.RootNode.GetSubNodeByPath(pathOfStartNode)), advanceProgressCallback)
 {
 }
示例#3
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="startNode">The crawler will begin searching for RBF files from this node.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, FSNodeDir startNode)
     : this(foreachRBF, startNode, null)
 {
 }
示例#4
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="pathOfStartNode">The crawler will begin searching for RBF files from this node.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, string pathOfStartNode)
     : this(foreachRBF, pathOfStartNode, null)
 {
 }
示例#5
0
        /// <summary>
        /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
        /// </summary>
        /// <param name="foreachRBF">This delegate is called for every RBF.</param>
        /// <param name="startNode">The crawler will begin searching for RBF files from this node.</param>
        /// <param name="advanceProgressCallback">Called everytime a file has been processed.</param>
        /// <exception cref="ArgumentNullException"><paramref name="foreachRBF" /> is <c>null</c>.</exception>
        public RBFCrawler(CrawlerCallback foreachRBF, FSNodeDir startNode, Action advanceProgressCallback)
        {
            if (foreachRBF == null) throw new ArgumentNullException("foreachRBF");
            if (startNode == null) throw new ArgumentNullException("startNode");

            m_foreachRBF = foreachRBF;
            m_startNode = startNode;
            m_advanceProgressCallback = advanceProgressCallback;
            UseDedicatedThread = true;
        }
示例#6
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="startNode">The crawler will begin searching for RBF files from this node.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, FSNodeDir startNode)
     : this(foreachRBF, startNode, null)
 {
 }
示例#7
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="pathOfStartNode">The crawler will begin searching for RBF files from this node.</param>
 /// <param name="advanceProgressCallback">Called everytime a file has been processed.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, string pathOfStartNode, Action advanceProgressCallback)
     : this(foreachRBF, (FSNodeDir)(string.IsNullOrEmpty(pathOfStartNode) ? FileManager.AttribTree.RootNode : FileManager.AttribTree.RootNode.GetSubNodeByPath(pathOfStartNode)), advanceProgressCallback)
 {
 }
示例#8
0
 /// <summary>
 /// Creates a new RBFCrawler that call the specified delegate for every RBF and starts at a given directory.
 /// </summary>
 /// <param name="foreachRBF">This delegate is called for every RBF.</param>
 /// <param name="pathOfStartNode">The crawler will begin searching for RBF files from this node.</param>
 public RBFCrawler(CrawlerCallback foreachRBF, string pathOfStartNode)
     : this(foreachRBF, pathOfStartNode, null)
 {
 }