private static string GenerateNDRBody(string headingText, List <string> smallText, List <AttachmentFile> attachmentFiles, bool showHyperLink, List <string> recipientList, List <string> largeTexts)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(string.Format("<div style=\"background-color:#F8D4D4;border:1px solid #F5A6A7\"><div style=\"padding: 10px 5px 13px 12px;\">{0}</div></div>", headingText));
            stringBuilder.Append(string.Format("<div style=\"padding-top: 20px;line-height:20px\">{0}</div>", smallText[0]));
            for (int i = 1; i < smallText.Count; i++)
            {
                stringBuilder.Append(string.Format("<div style=\"padding-top: 10px;line-height:20px\">{0}</div>", smallText[i]));
            }
            if (recipientList != null && attachmentFiles.Count == 1)
            {
                StringBuilder stringBuilder2 = new StringBuilder();
                foreach (string arg in recipientList)
                {
                    stringBuilder2.Append(string.Format("<div>{0}</div>", arg));
                }
                stringBuilder.Append(string.Format("<div style=\"padding-top: 10px;\">{0}</div>", stringBuilder2.ToString()));
            }
            else if (attachmentFiles.Count > 1)
            {
                StringBuilder stringBuilder3 = new StringBuilder();
                if (showHyperLink)
                {
                    using (List <AttachmentFile> .Enumerator enumerator2 = attachmentFiles.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            AttachmentFile attachmentFile = enumerator2.Current;
                            string         arg2           = string.Format("<a href=\"{0}\" target=\"_blank\" style=\"text-decoration: none;color:#0072C6\">{1}</a>", attachmentFile.FileURL, attachmentFile.FileName);
                            stringBuilder3.Append(string.Format("<div>{0}</div>", arg2));
                        }
                        goto IL_17B;
                    }
                }
                foreach (AttachmentFile attachmentFile2 in attachmentFiles)
                {
                    stringBuilder3.Append(string.Format("<div>{0}</div>", attachmentFile2.FileName));
                }
IL_17B:
                stringBuilder.Append(string.Format("<div style=\"padding-top: 10px;\">{0}</div>", stringBuilder3.ToString()));
            }
            if (largeTexts.Count == 1)
            {
                stringBuilder.Append(string.Format("<div style=\"padding-top: 15px; font-size: 21px;line-height:24px\">{0}</div>", largeTexts[0]));
            }
            else
            {
                StringBuilder stringBuilder4 = new StringBuilder();
                stringBuilder4.Append(largeTexts[0]);
                StringBuilder stringBuilder5 = new StringBuilder();
                for (int j = 1; j < largeTexts.Count; j++)
                {
                    stringBuilder5.Append(string.Format("<li>{0}</li>", largeTexts[j]));
                }
                stringBuilder4.Append(string.Format("<ul style=\"position:relative;top:-20px\">{0}</ul>", stringBuilder5.ToString()));
                stringBuilder.Append(string.Format("<div style=\"padding-top: 15px; font-size: 21px;line-height:24px\">{0}</div>", stringBuilder4.ToString()));
            }
            return(string.Format("<div style=\"width:570px;font-size: 17px; font-family: 'Segoe UI', 'Segoe UI WPC', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif; font-weight:lighter;color: #333333\">{0}</div>", stringBuilder.ToString()));
        }
        // Token: 0x06001C02 RID: 7170 RVA: 0x0006D978 File Offset: 0x0006BB78
        private static void CreateFailureMessages(UserContext userContext, ExchangePrincipal exchangePrincipal, Dictionary <string, IList <IUserSharingResult> > failedResultsDictionary, List <string> noProviderResources, List <string> resourceList, List <string> largeDLsList)
        {
            string text = null;
            List <AttachmentFile> list;

            if (noProviderResources != null)
            {
                list = UpdateAttachmentPermissions.GetAttachmentFiles(noProviderResources);
                text = AttachmentMessageBodyGenerator.GenerateBodyForAttachmentNotFound(list);
                UpdateAttachmentPermissions.CreateOneFailureMessage(userContext, exchangePrincipal, text, list);
            }
            if (failedResultsDictionary != null && failedResultsDictionary.Count > 0)
            {
                list = new List <AttachmentFile>();
                List <string>     list2 = new List <string>();
                IRecipientSession adrecipientSession = CallContext.Current.ADRecipientSessionContext.GetADRecipientSession();
                foreach (string text2 in failedResultsDictionary.Keys)
                {
                    AttachmentFile item = new AttachmentFile(UpdateAttachmentPermissions.GetFileNameFromLocation(text2), HttpUtility.UrlDecode(text2));
                    list.Add(item);
                    foreach (IUserSharingResult userSharingResult in failedResultsDictionary[text2])
                    {
                        string text3 = userSharingResult.User;
                        if (text3 != null && !text3.Contains("@"))
                        {
                            text3 = UpdateAttachmentPermissions.ConvertBetweenADRecipientProperties(adrecipientSession, text3, ADRecipientSchema.ExternalDirectoryObjectId, ADRecipientSchema.PrimarySmtpAddress);
                        }
                        if (text3 != null)
                        {
                            list2.Add(text3);
                        }
                    }
                }
                text = AttachmentMessageBodyGenerator.GenerateBodyForSetWrongPermission(list, list2);
                UpdateAttachmentPermissions.CreateOneFailureMessage(userContext, exchangePrincipal, text, list);
            }
            list = UpdateAttachmentPermissions.GetAttachmentFiles(resourceList);
            if (largeDLsList != null && largeDLsList.Count > 0)
            {
                StringBuilder stringBuilder = new StringBuilder();
                foreach (string value in largeDLsList)
                {
                    if (stringBuilder.Length > 0)
                    {
                        stringBuilder.Append(Strings.DistributionListNameSeperator);
                    }
                    stringBuilder.Append(value);
                }
                text = AttachmentMessageBodyGenerator.GenerateBodyForSentToTooLargeDL(list, stringBuilder.ToString());
                UpdateAttachmentPermissions.CreateOneFailureMessage(userContext, exchangePrincipal, text, list);
                return;
            }
            if (text == null)
            {
                text = AttachmentMessageBodyGenerator.GenerateBodyForCatchAll(list);
                UpdateAttachmentPermissions.CreateOneFailureMessage(userContext, exchangePrincipal, text, list);
            }
        }
        // Token: 0x06001C03 RID: 7171 RVA: 0x0006DB60 File Offset: 0x0006BD60
        private static List <AttachmentFile> GetAttachmentFiles(List <string> resourceList)
        {
            List <AttachmentFile> list = new List <AttachmentFile>();

            if (resourceList != null)
            {
                foreach (string text in resourceList)
                {
                    AttachmentFile item = new AttachmentFile(UpdateAttachmentPermissions.GetFileNameFromLocation(text), HttpUtility.UrlDecode(text));
                    list.Add(item);
                }
            }
            return(list);
        }