protected override void InternalProcessRecord() { ADUser aduser = null; if (this.IsDefault) { aduser = RecipientTaskHelper.ResetOldDefaultPlan((IRecipientSession)base.DataSession, this.DataObject.Id, this.DataObject.OrganizationalUnitRoot, new Task.ErrorLoggerDelegate(base.WriteError)); } bool flag = false; try { base.InternalProcessRecord(); flag = true; } finally { if (!flag && aduser != null) { aduser.IsDefault = true; try { base.DataSession.Save(aduser); } catch (DataSourceTransientException exception) { this.WriteError(exception, ExchangeErrorCategory.ServerTransient, null, false); } } } }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); ADUser aduser = null; if (this.DataObject.IsDefault) { aduser = RecipientTaskHelper.ResetOldDefaultPlan((IRecipientSession)base.DataSession, this.DataObject.Id, this.DataObject.OrganizationalUnitRoot, new Task.ErrorLoggerDelegate(base.WriteError)); } bool flag = false; try { this.DataObject[MailboxPlanSchema.MailboxPlanRelease] = (base.Fields.IsModified("MailboxPlanRelease") ? this.MailboxPlanRelease : MailboxPlanRelease.AllReleases); base.InternalProcessRecord(); flag = true; } finally { if (!flag && aduser != null) { aduser.IsDefault = true; try { base.DataSession.Save(aduser); } catch (DataSourceTransientException exception) { base.WriteError(exception, ExchangeErrorCategory.Client, null); } } } TaskLogger.LogExit(); }