// Token: 0x06000038 RID: 56 RVA: 0x00002D10 File Offset: 0x00000F10
        protected RetrievedPayload RetrieveJobDistributionPayload(OrganizationId organizationId, Guid jobRunId, int taskId)
        {
            RetrievedPayload      retrievedPayload      = new RetrievedPayload();
            ComplianceJobProvider complianceJobProvider = new ComplianceJobProvider(organizationId);
            Guid tenantGuid = organizationId.GetTenantGuid();

            retrievedPayload.IsComplete = this.HasMoreTasks(organizationId, jobRunId);
            IEnumerable <CompositeTask> enumerable = from x in complianceJobProvider.FindCompositeTasks(tenantGuid, jobRunId, null, null)
                                                     where x.TaskId > taskId
                                                     select x;

            if (enumerable != null)
            {
                foreach (CompositeTask compositeTask in enumerable)
                {
                    JobPayload jobPayload = new JobPayload();
                    jobPayload.Target = new Target
                    {
                        TargetType = Target.Type.MailboxSmtpAddress,
                        Identifier = compositeTask.UserMaster
                    };
                    PayloadReference payloadReference = PayloadHelper.GetPayloadReference(jobRunId, compositeTask.TaskId);
                    jobPayload.Children.Add(ComplianceSerializer.Serialize <PayloadReference>(PayloadReference.Description, payloadReference));
                    retrievedPayload.Children.Add(jobPayload);
                    retrievedPayload.Bookmark = compositeTask.TaskId.ToString();
                }
                return(retrievedPayload);
            }
            throw new ArgumentException(string.Format("Not Task Data Found. TenantId-{0} JobId-{1} and TaskId-{2}", tenantGuid, jobRunId, taskId));
        }
        // Token: 0x0600003A RID: 58 RVA: 0x00002F48 File Offset: 0x00001148
        private ComplianceJob GetComplianceJob(OrganizationId organizationId, Guid jobRunId)
        {
            ComplianceJobProvider complianceJobProvider = new ComplianceJobProvider(organizationId);
            Guid          tenantGuid    = organizationId.GetTenantGuid();
            ComplianceJob complianceJob = complianceJobProvider.FindComplianceJob(tenantGuid, jobRunId).Single <ComplianceJob>();

            if (complianceJob != null)
            {
                return(complianceJob);
            }
            throw new ArgumentException(string.Format("No job data found. TenantId-{0} and JobRunId-{1}", tenantGuid, jobRunId));
        }
        // Token: 0x06000039 RID: 57 RVA: 0x00002E68 File Offset: 0x00001068
        protected RetrievedPayload RetrieveTaskDistributionPayload(OrganizationId organizationId, Guid jobRunId, int taskId)
        {
            RetrievedPayload      retrievedPayload      = new RetrievedPayload();
            ComplianceJobProvider complianceJobProvider = new ComplianceJobProvider(organizationId);
            Guid          tenantGuid    = organizationId.GetTenantGuid();
            CompositeTask compositeTask = complianceJobProvider.FindCompositeTasks(tenantGuid, jobRunId, null, new int?(taskId)).SingleOrDefault <CompositeTask>();

            if (compositeTask != null)
            {
                foreach (string identifier in compositeTask.Users)
                {
                    JobPayload jobPayload = new JobPayload();
                    jobPayload.Target = new Target
                    {
                        TargetType = Target.Type.MailboxSmtpAddress,
                        Identifier = identifier
                    };
                    retrievedPayload.Children.Add(jobPayload);
                }
                return(retrievedPayload);
            }
            throw new ArgumentException(string.Format("No Task data found. TenantId-{0} JobId-{1} and TaskId-{2}", tenantGuid, jobRunId, taskId));
        }