示例#1
0
        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);
            }
        }