public TaskSchedulerWrapper() { mService = new S.TaskScheduler(); mService.Connect(); mRootFolder = mService.GetFolder(@"\"); }
public void Dispose() { if (mService != null) { Marshal.ReleaseComObject(mService); mService = null; } if (mRootFolder != null) { Marshal.ReleaseComObject(mRootFolder); mRootFolder = null; } }