// Token: 0x06002FC3 RID: 12227 RVA: 0x00115F1C File Offset: 0x0011411C
 public static bool RenderMeetingPlainTextBody(TextWriter output, Item item, UserContext userContext, bool doSignature)
 {
     if (output == null)
     {
         throw new ArgumentNullException("output");
     }
     if (userContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     if (item == null)
     {
         return(false);
     }
     if (item.Body == null)
     {
         return(false);
     }
     if (item.Body.Size > 0L)
     {
         BodyConversionUtilities.ConvertAndOutputBody(output, item.Body, Markup.PlainText, null);
         return(true);
     }
     if (doSignature && userContext.UserOptions.AutoAddSignature && userContext.IsFeatureEnabled(Feature.Signature))
     {
         output.Write("\n\n\n");
         Utilities.HtmlEncode(userContext.UserOptions.SignatureText, output);
     }
     return(false);
 }
        // Token: 0x06002FC4 RID: 12228 RVA: 0x00115FB0 File Offset: 0x001141B0
        private static void RenderComposeBody(TextWriter output, Item item, OwaSafeHtmlCallbackBase callBack, UserContext userContext, Markup markup)
        {
            if (item == null)
            {
                return;
            }
            Body body = item.Body;

            if (OwaContext.Current.UserContext.IsIrmEnabled && Utilities.IsIrmRestrictedAndDecrypted(item))
            {
                body = ((RightsManagedMessageItem)item).ProtectedBody;
            }
            if (body != null && body.Size > 0L)
            {
                BodyConversionUtilities.ConvertAndOutputBody(output, body, markup, callBack);
            }
        }
        // Token: 0x06002FC2 RID: 12226 RVA: 0x00115D90 File Offset: 0x00113F90
        public static void RenderReadBody(TextWriter output, Item item, OwaSafeHtmlCallbackBase callBack, bool isJunkOrPhishing, bool isIrmEnabled)
        {
            if (output == null)
            {
                throw new ArgumentNullException("output");
            }
            if (item == null)
            {
                return;
            }
            ReportMessage reportMessage = item as ReportMessage;
            bool          flag          = null != reportMessage;
            Item          item2         = null;

            try
            {
                if (Utilities.IsOpaqueSigned(item))
                {
                    MessageItem messageItem = item as MessageItem;
                    if (messageItem != null && ItemConversion.TryOpenSMimeContent(messageItem, OwaContext.Current.UserContext.Configuration.DefaultAcceptedDomain.DomainName.ToString(), out item2))
                    {
                        item = item2;
                    }
                }
                if (item.Body == null || (flag && item.Body.Size <= 0L))
                {
                    if (flag)
                    {
                        using (MemoryStream memoryStream = new MemoryStream())
                        {
                            Charset charset;
                            reportMessage.GenerateReportBody(memoryStream, out charset);
                            item.OpenAsReadWrite();
                            BodyWriteConfiguration configuration = new BodyWriteConfiguration(BodyFormat.TextHtml, charset.Name);
                            using (Stream stream = item.Body.OpenWriteStream(configuration))
                            {
                                memoryStream.Position = 0L;
                                memoryStream.WriteTo(stream);
                            }
                            goto IL_E2;
                        }
                    }
                    return;
                }
IL_E2:
                Body body = item.Body;
                if (isIrmEnabled && Utilities.IsIrmRestrictedAndDecrypted(item))
                {
                    body = ((RightsManagedMessageItem)item).ProtectedBody;
                }
                if (body.Size > 0L)
                {
                    Markup markup = Markup.Html;
                    if (isJunkOrPhishing)
                    {
                        markup = Markup.PlainText;
                    }
                    BodyConversionUtilities.ConvertAndOutputBody(output, body, markup, callBack);
                }
            }
            finally
            {
                if (item2 != null)
                {
                    item2.Dispose();
                    item2 = null;
                }
            }
        }