Ejemplo n.º 1
0
        public ManagedObjectReference CreateCollectorForTasks(TaskFilterSpec filter)
        {
            ManagedObjectReference result;

            try
            {
                CreateCollectorForTasksRequestType createCollectorForTasksRequestType = new CreateCollectorForTasksRequestType();
                createCollectorForTasksRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createCollectorForTasksRequestType.filter = (VimApi_65.TaskFilterSpec)VIConvert.ToWsdlType(filter);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateCollectorForTasks(new CreateCollectorForTasksRequest(createCollectorForTasksRequestType)).CreateCollectorForTasksResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public TaskHistoryCollector GetTaskCollectorView(TaskFilterSpecRecursionOption recursionOption, TaskFilterSpec taskFilterSpec)
        {
            if (taskFilterSpec == null)
            {
                taskFilterSpec = new TaskFilterSpec();
            }
            taskFilterSpec.Entity = new TaskFilterSpecByEntity
            {
                Entity    = this.MoRef,
                Recursion = recursionOption
            };
            ManagedObjectReference moRef = ((TaskManager)this.Client.GetView(this.Client.ServiceContent.TaskManager, null)).CreateCollectorForTasks(taskFilterSpec);
            TaskHistoryCollector   taskHistoryCollector = new TaskHistoryCollector(this.Client, moRef);

            taskHistoryCollector.UpdateViewData(null);
            return(taskHistoryCollector);
        }
Ejemplo n.º 3
0
 public TaskHistoryCollector GetAllTasksView(TaskFilterSpec taskFilterSpec)
 {
     return(this.GetTaskCollectorView(TaskFilterSpecRecursionOption.all, taskFilterSpec));
 }
Ejemplo n.º 4
0
 public TaskHistoryCollector GetEntityOnlyTasksCollectorView(TaskFilterSpec taskFilterSpec)
 {
     return(this.GetTaskCollectorView(TaskFilterSpecRecursionOption.self, taskFilterSpec));
 }