Exemplo n.º 1
0
 internal TaskCollection(TaskFolder folder, IRegisteredTaskCollection iTaskColl, Regex filter = null)
 {
     svc    = folder.TaskService;
     Filter = filter;
     fld    = folder;
     v2Coll = iTaskColl;
 }
Exemplo n.º 2
0
        /// <summary>
        ///   Finds the task in folder.
        /// </summary>
        /// <param name="fld"> The folder. </param>
        /// <param name="taskName"> The wildcard expression to compare task names with. </param>
        /// <param name="results"> The results. </param>
        /// <param name="recurse"> if set to <c>true</c> recurse folders. </param>
        /// <returns> True if any tasks are found, False if not. </returns>
        private bool FindTaskInFolder(TaskFolder fld, Regex taskName, ref List <Task> results, bool recurse = true)
        {
            results.AddRange(fld.GetTasks(taskName));

            if (recurse)
            {
                foreach (var f in fld.SubFolders)
                {
                    if (FindTaskInFolder(f, taskName, ref results, recurse))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Exemplo n.º 3
0
        /// <summary>
        ///   Finds the task in folder.
        /// </summary>
        /// <param name="fld"> The folder. </param>
        /// <param name="taskName"> The wildcard expression to compare task names with. </param>
        /// <param name="results"> The results. </param>
        /// <param name="recurse"> if set to <c>true</c> recurse folders. </param>
        /// <returns> True if any tasks are found, False if not. </returns>
        private bool FindTaskInFolder(TaskFolder fld, Regex taskName, ref List<Task> results, bool recurse = true)
        {
            results.AddRange(fld.GetTasks(taskName));

            if (recurse) {
                foreach (var f in fld.SubFolders) {
                    if (FindTaskInFolder(f, taskName, ref results, recurse)) {
                        return true;
                    }
                }
            }
            return false;
        }
Exemplo n.º 4
0
 internal V2TaskEnumerator(TaskFolder folder, IRegisteredTaskCollection iTaskColl, Regex filter = null)
 {
     fld         = folder;
     iEnum       = iTaskColl.GetEnumerator();
     this.filter = filter;
 }