// Token: 0x06001449 RID: 5193 RVA: 0x00074E8C File Offset: 0x0007308C
        protected override void InternalCopyFromModified(IProperty srcProperty)
        {
            Item             item            = (Item)base.XsoItem;
            IContentProperty contentProperty = (IContentProperty)srcProperty;

            switch (contentProperty.GetNativeType())
            {
            case BodyType.PlainText:
                break;

            case BodyType.Html:
                goto IL_D3;

            case BodyType.Rtf:
                if (contentProperty.Body.Length > 0L)
                {
                    using (Stream stream = XsoContentProperty.OpenBodyWriteStream(item, Microsoft.Exchange.Data.Storage.BodyFormat.ApplicationRtf))
                    {
                        try
                        {
                            StreamHelper.CopyStreamWithBase64Conversion(contentProperty.Body, stream, -1, false);
                        }
                        catch (FormatException innerException)
                        {
                            throw new AirSyncPermanentException(StatusCode.Sync_ServerError, innerException, false)
                                  {
                                      ErrorStringForProtocolLogger = "RtfToBase64StreamError"
                                  };
                        }
                        return;
                    }
                }
                using (TextWriter textWriter = item.Body.OpenTextWriter(Microsoft.Exchange.Data.Storage.BodyFormat.TextPlain))
                {
                    textWriter.Write(string.Empty);
                    return;
                }
                break;

            default:
                goto IL_F8;
            }
            using (Stream stream2 = XsoContentProperty.OpenBodyWriteStream(item, Microsoft.Exchange.Data.Storage.BodyFormat.TextPlain))
            {
                StreamHelper.CopyStream(contentProperty.Body, stream2);
                return;
            }
IL_D3:
            using (Stream stream3 = XsoContentProperty.OpenBodyWriteStream(item, Microsoft.Exchange.Data.Storage.BodyFormat.TextHtml))
            {
                StreamHelper.CopyStream(contentProperty.Body, stream3);
                return;
            }
IL_F8:
            throw new ConversionException("Source body property does not have Rtf or Text body present");
        }
        // Token: 0x06001447 RID: 5191 RVA: 0x00074CF4 File Offset: 0x00072EF4
        public Stream GetData(BodyType type, long truncationSize, out long totalDataSize, out IEnumerable <AirSyncAttachmentInfo> attachments)
        {
            Item item = base.XsoItem as Item;

            attachments = null;
            if (item == null)
            {
                totalDataSize = 0L;
                return(null);
            }
            IList <AttachmentLink> list = null;
            Stream stream;

            if (string.Equals(item.ClassName, "IPM.Note.SMIME", StringComparison.OrdinalIgnoreCase) && truncationSize != 0L)
            {
                switch (type)
                {
                case BodyType.PlainText:
                {
                    string s = Strings.SMIMENotSupportedBodyText.ToString(item.Session.PreferedCulture);
                    stream        = new MemoryStream(Encoding.UTF8.GetBytes(s));
                    totalDataSize = stream.Length;
                    return(stream);
                }

                case BodyType.Html:
                {
                    string s = XsoContentProperty.GetSMIMENotSupportedBodyHtml(item.Session);
                    stream        = new MemoryStream(Encoding.UTF8.GetBytes(s));
                    totalDataSize = stream.Length;
                    return(stream);
                }
                }
            }
            switch (type)
            {
            case BodyType.None:
                throw new ConversionException("Invalid body type requested");

            case BodyType.PlainText:
                stream = BodyConversionUtilities.ConvertToPlainTextStream(item, truncationSize, out totalDataSize, out list);
                break;

            case BodyType.Html:
                stream = BodyConversionUtilities.ConvertHtmlStream(item, truncationSize, out totalDataSize, out list);
                break;

            case BodyType.Rtf:
                return(this.GetRtfData(truncationSize, out totalDataSize, out list));

            case BodyType.Mime:
                throw new ConversionException("Invalid body type requested");

            default:
                stream        = null;
                totalDataSize = 0L;
                break;
            }
            if (list != null)
            {
                attachments = from attachmentLink in list
                              select new AirSyncAttachmentInfo
                {
                    AttachmentId = attachmentLink.AttachmentId,
                    IsInline     = (attachmentLink.IsMarkedInline ?? attachmentLink.IsOriginallyInline),
                    ContentId    = attachmentLink.ContentId
                };
            }
            return(stream);
        }