private void SendApprovalRequest(ApprovalRequestWriter writer, ICollection <RoutingAddress> p1DecisionMakers, CultureInfo cultureInfo, string messageId, byte[] corelationBlob)
        {
            IList <RoutingAddress> decisionMakers = this.initiationMessage.DecisionMakers;

            byte[] conversationIndex = this.initiationMessageItem.ConversationIndex;
            (string)this.initiationMessage.Requestor;
            using (MessageItemApprovalRequest messageItemApprovalRequest = this.requestCreate(this.mbxTransportMailItem))
            {
                messageItemApprovalRequest.SetSender(this.approvalRequestSender);
                foreach (RoutingAddress routingAddress in decisionMakers)
                {
                    bool flag = p1DecisionMakers == null || p1DecisionMakers.Contains(routingAddress);
                    messageItemApprovalRequest.AddRecipient(routingAddress, flag);
                    InitiationProcessor.diag.TraceDebug <RoutingAddress, bool>(0L, "Added recipient '{0}' with promote to P1={1}.", routingAddress, flag);
                }
                CultureInfo cultureInfo2;
                if (!writer.WriteSubjectAndBody(messageItemApprovalRequest, cultureInfo, out cultureInfo2))
                {
                    InitiationProcessor.diag.TraceError <ApprovalRequestWriter>(0L, "Approval request body cannot be written with writer {0}", writer);
                }
                messageItemApprovalRequest.ApprovalRequestor = this.initiationMessage.Requestor;
                messageItemApprovalRequest.MessageItem[ItemSchema.NormalizedSubject] = this.initiationMessageItem.ConversationTopic;
                messageItemApprovalRequest.MessageItem.Importance = this.initiationMessageItem.Importance;
                messageItemApprovalRequest.MessageItem.References = InitiationProcessor.ConstructApprovalRequestReferences(this.initiationMessageItem);
                ConversationIndex o = ConversationIndex.CreateFromParent(conversationIndex);
                if (!ConversationIndex.Empty.Equals(o))
                {
                    messageItemApprovalRequest.MessageItem.ConversationIndex = o.ToByteArray();
                }
                if (cultureInfo2 != null)
                {
                    InitiationProcessor.diag.TraceDebug <CultureInfo>(0L, "Approval request written in {0}", cultureInfo2);
                    messageItemApprovalRequest.MessageItem[MessageItemSchema.MessageLocaleId] = cultureInfo2.LCID;
                }
                foreach (Attachment attachment in this.initiationMessage.EmailMessage.Attachments)
                {
                    messageItemApprovalRequest.AddAttachment(attachment, this.mbxTransportMailItem.ADRecipientCache.ADSession);
                }
                if (this.initiationMessage.EmailMessage.RootPart != null && this.initiationMessage.EmailMessage.RootPart.Headers != null)
                {
                    HeaderList headers = this.initiationMessage.EmailMessage.RootPart.Headers;
                    Header[]   array   = headers.FindAll("X-MS-Exchange-Inbox-Rules-Loop");
                    if (array != null && array.Length > 0)
                    {
                        string[] array2 = new string[array.Length];
                        for (int i = 0; i < array.Length; i++)
                        {
                            array2[i] = array[i].Value;
                        }
                        messageItemApprovalRequest.MessageItem.SafeSetProperty(MessageItemSchema.XLoop, array2);
                    }
                }
                InitiationProcessor.AddVotingToApprovalRequest(messageItemApprovalRequest, this.initiationMessage.VotingActions, cultureInfo2);
                messageItemApprovalRequest.Send(messageId, corelationBlob, this.mbxTransportMailItem);
            }
        }
 // Token: 0x06000116 RID: 278 RVA: 0x00007164 File Offset: 0x00005364
 private static void SaveSmsItem(MessageItem message, ConversationIndex conversationIndex)
 {
     try
     {
         message[ItemSchema.ConversationIndex]         = conversationIndex.ToByteArray();
         message[ItemSchema.ConversationIndexTracking] = true;
         message.Save(SaveMode.ResolveConflicts);
     }
     catch (QuotaExceededException ex)
     {
         SentItemsProcessor.Tracer.TraceDebug <string>(0L, "Saving failed because quota exceeded. Exception: {0}", ex.Message);
     }
 }