protected override void Execute() { try { if (!Guard.IsResourceLive(_folder)) { return; } Folder.SetSeeAll(_folder, false); if (Folder.IsIgnored(_folder)) { foreach (IResource mail in Folder.GetMailList(_folder)) { Mail.ForceDelete(mail); } } else { RefreshFolderDescriptor.Do(JobPriority.Normal, new FolderDescriptor(_folder), Settings.IndexStartDate); } } catch (Exception exception) { Core.ReportException(exception, ExceptionReportFlags.AttachLog); Tracer._TraceException(exception); } }
protected override void Execute() { IResource resParentFolder = GetParentFolder(); if (resParentFolder != null) { IResource resFolder = Folder.FindOrCreate(_folder, resParentFolder); Folder.SetSeeAll(resFolder, true); } }