コード例 #1
0
ファイル: Folder.cs プロジェクト: HarryCU/QwPlatform
 public Folder(string fullName)
     : base(fullName)
 {
     _buffer  = new VBuffer();
     _files   = new FileArray();
     _folders = new FolderArray();
 }
コード例 #2
0
        public TestOutcome GetAllTasksForFolder(string folder)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Task";
            outcome.methodName = "TaskList";
            try
            {
                TasksApi    tasksApi = new TasksApi(_url);
                FolderArray tasks    = tasksApi.TaskList(_session.SessionId, folder);
                foreach (Folder task in tasks)
                {
                    Console.WriteLine(task.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #3
0
        public TestOutcome DestroyTask(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Task";
            outcome.methodName = "TaskDestroy";
            try
            {
                TasksApi tasksApi               = new TasksApi(_url);
                IO.Swagger.Model.Task task      = TaskGenerator.GetFlatTask();
                JobReport             job       = tasksApi.TaskCreate(_session.SessionId, "all", task);
                JobReport             polledJob = JobHandler.pollJob(job, _session.SessionId, _url);
                FolderArray           tasks     = tasksApi.TaskSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("tasks.name", "like", filterstring + "%"));
                tasksApi.TaskDestroy(_session.SessionId, tasks[0].ReferenceId);
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #4
0
        public TestOutcome SearchForTasks(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Task";
            outcome.methodName = "TaskSearch";
            try
            {
                TasksApi    tasksApi = new TasksApi(_url);
                FolderArray tasks    = tasksApi.TaskSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("tasks.name", "like", filterstring + "%"));
                foreach (Folder task in tasks)
                {
                    Console.WriteLine(task.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #5
0
        public TestOutcome GetAllOutlines()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Outlines";
            outcome.methodName = "OutlineList";
            try
            {
                OutlinesApi outlinesApi = new OutlinesApi(_url);
                FolderArray outlines    = outlinesApi.OutlineList(_session.SessionId, ""); //note path not really needed for this method so pass empty
                foreach (Folder outline in outlines)
                {
                    Console.WriteLine(outline.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #6
0
        public TestOutcome GetFolderBySearch()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Folders";
            outcome.methodName = "FolderSearch";
            try
            {
                FoldersApi  foldersApi = new FoldersApi(_url);
                FolderArray folders    = foldersApi.FolderSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("_", "contains", "method"));
                foreach (Folder folder in folders)
                {
                    Console.WriteLine(folder.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #7
0
        public TestOutcome GetFoldersUnder(string path)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Folders";
            outcome.methodName = "FolderList";
            try
            {
                FoldersApi  foldersApi = new FoldersApi(_url);
                FolderArray folders    = foldersApi.FolderList(_session.SessionId, path, 100);
                foreach (Folder folder in folders)
                {
                    Console.WriteLine(folder.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
コード例 #8
0
        public TestOutcome GetProcessesByOutline(string outline)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "OutlineProcesses";
            outcome.methodName = "ProcessList";
            try
            {
                OutlineProcessesApi processesApi = new OutlineProcessesApi(_url);
                FolderArray         processes    = processesApi.ProcessList(_session.SessionId, outline, 100);
                foreach (Folder process in processes)
                {
                    Console.WriteLine(process.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }