// 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));
        }
        protected override ComplianceMessage CreateStartJobMessage()
        {
            ComplianceMessage complianceMessage = base.CreateStartJobMessage();

            complianceMessage.WorkDefinitionType = WorkDefinitionType.EDiscovery;
            JobPayload jobPayload = new JobPayload();

            jobPayload.JobId     = this.DataObject.JobRunId.ToString();
            jobPayload.Target    = complianceMessage.MessageTarget;
            jobPayload.PayloadId = string.Empty;
            jobPayload.Children.Add(PayloadHelper.GetPayloadReference(this.DataObject.JobRunId, -1));
            jobPayload.Payload        = this.DataObject.GetExchangeWorkDefinition();
            complianceMessage.Payload = ComplianceSerializer.Serialize <JobPayload>(JobPayload.Description, jobPayload);
            return(complianceMessage);
        }