Пример #1
0
        public void Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(TextRun.m_declaration);
            IScalabilityCache scalabilityCache = writer.PersistenceHelper as IScalabilityCache;

            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.Text:
                    writer.Write(this.m_text);
                    break;

                case MemberName.Style:
                    writer.WriteByteVariantHashtable(this.m_styles);
                    break;

                case MemberName.ToolTip:
                    writer.Write(this.m_toolTip);
                    break;

                case MemberName.MarkupType:
                    writer.Write(this.m_markup);
                    break;

                case MemberName.Actions:
                    writer.WriteListOfPrimitives(this.m_hyperlinks);
                    break;

                case MemberName.UniqueName:
                    writer.Write(this.m_uniqueName);
                    break;

                case MemberName.Source:
                    writer.Write(scalabilityCache.StoreStaticReference(this.m_source));
                    break;

                case MemberName.Indexes:
                    writer.WriteListOfPrimitives(this.m_splitIndices);
                    break;

                case MemberName.Offset:
                    writer.Write(this.m_startCharacterOffset);
                    break;

                case MemberName.Key:
                    writer.Write(this.m_fontKey);
                    break;

                default:
                    RSTrace.RenderingTracer.Assert(false, string.Empty);
                    break;
                }
            }
        }
Пример #2
0
        public void Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(Paragraph.m_declaration);
            IScalabilityCache scalabilityCache = writer.PersistenceHelper as IScalabilityCache;

            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.TextRuns:
                    writer.Write(this.m_textRuns);
                    break;

                case MemberName.Style:
                    writer.WriteByteVariantHashtable(this.m_styles);
                    break;

                case MemberName.ListStyle:
                    writer.Write((byte?)this.m_listStyle);
                    break;

                case MemberName.ListLevel:
                    writer.Write(this.m_listLevel);
                    break;

                case MemberName.ParagraphNumber:
                    writer.Write(this.m_paragraphNumber);
                    break;

                case MemberName.SpaceBefore:
                    Utility.WriteReportSize(writer, this.m_spaceBefore);
                    break;

                case MemberName.SpaceAfter:
                    Utility.WriteReportSize(writer, this.m_spaceAfter);
                    break;

                case MemberName.LeftIndent:
                    Utility.WriteReportSize(writer, this.m_leftIndent);
                    break;

                case MemberName.RightIndent:
                    Utility.WriteReportSize(writer, this.m_rightIndent);
                    break;

                case MemberName.HangingIndent:
                    Utility.WriteReportSize(writer, this.m_hangingIndent);
                    break;

                case MemberName.FirstLine:
                    writer.Write(this.m_firstLine);
                    break;

                case MemberName.UniqueName:
                    writer.Write(this.m_uniqueName);
                    break;

                case MemberName.Source:
                    writer.Write(scalabilityCache.StoreStaticReference(this.m_source));
                    break;

                default:
                    RSTrace.RenderingTracer.Assert(false, string.Empty);
                    break;
                }
            }
        }