protected override IConfigDataProvider CreateSession() { IRecipientSession sessionForDeletedObjects = MailboxTaskHelper.GetSessionForDeletedObjects(this.DomainController, base.CurrentOrganizationId, base.ExecutingUserOrganizationId); this.inputCookie = SyncTaskHelper.ResolveSyncCookie(this.Cookie, sessionForDeletedObjects, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError)); return(sessionForDeletedObjects); }
protected override IConfigDataProvider CreateSession() { IRecipientSession recipientSession = (IRecipientSession)base.CreateSession(); if (base.ParameterSetName == "CookieSet") { recipientSession.UseGlobalCatalog = true; this.inputCookie = SyncTaskHelper.ResolveSyncCookie(this.Cookie, recipientSession, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError)); } return(recipientSession); }
protected override IConfigDataProvider CreateSession() { IRecipientSession recipientSession = (IRecipientSession)base.CreateSession(); ADObjectId rootId = recipientSession.SearchRoot; if (this.SoftDeletedMailUser.IsPresent && base.CurrentOrganizationId != null && base.CurrentOrganizationId.OrganizationalUnit != null) { rootId = new ADObjectId("OU=Soft Deleted Objects," + base.CurrentOrganizationId.OrganizationalUnit.DistinguishedName); } if (this.SoftDeletedMailUser.IsPresent) { recipientSession = SoftDeletedTaskHelper.GetSessionForSoftDeletedObjects(recipientSession, rootId); } if (base.ParameterSetName == "CookieSet") { recipientSession.UseGlobalCatalog = true; this.inputCookie = SyncTaskHelper.ResolveSyncCookie(this.Cookie, recipientSession, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError)); } return(recipientSession); }