internal static V2Interop.IRegisteredTask GetTask([NotNull] V2Interop.ITaskService iSvc, [NotNull] string name) { V2Interop.ITaskFolder fld = null; try { fld = iSvc.GetFolder("\\"); return(fld.GetTask(name)); } catch { return(null); } finally { if (fld != null) { Marshal.ReleaseComObject(fld); } } }
internal TaskFolder(TaskService svc, V2Interop.ITaskFolder iFldr) { this.TaskService = svc; v2Folder = iFldr; }