예제 #1
0
        private void method_4(IXDLSSerializableCollection A_0)
        {
            bool flag  = !this.xmlReader_0.IsEmptyElement;
            int  depth = this.xmlReader_0.Depth;

            this.xmlReader_0.ReadStartElement();
            if (flag)
            {
                while (this.xmlReader_0.Depth > depth)
                {
                    if (this.xmlReader_0.EOF)
                    {
                        break;
                    }
                    if (this.xmlReader_0.NodeType != XmlNodeType.Element)
                    {
                        this.xmlReader_0.Read();
                    }
                    else if (this.xmlReader_0.LocalName == A_0.TagItemName)
                    {
                        IDocumentSerializable serializable = A_0.AddNewItem(this);
                        this.method_3(serializable);
                    }
                }
                if (this.xmlReader_0.NodeType == XmlNodeType.EndElement)
                {
                    this.xmlReader_0.ReadEndElement();
                }
            }
        }
예제 #2
0
 public void BeforeSerialization()
 {
     if (this.dictionary_0 != null)
     {
         foreach (string str in this.dictionary_0.Keys)
         {
             IDocumentSerializable serializable = this.dictionary_0[str] as IDocumentSerializable;
             if (serializable != null)
             {
                 serializable.XDLSHolder.Cleared = true;
                 serializable.XDLSHolder.BeforeSerialization();
             }
             else
             {
                 IXDLSSerializableCollection serializables = this.dictionary_0[str] as IXDLSSerializableCollection;
                 if (serializables != null)
                 {
                     int num = 0;
                     foreach (IDocumentSerializable serializable2 in serializables)
                     {
                         if (serializable2 != null)
                         {
                             serializable2.XDLSHolder.Cleared = true;
                             serializable2.XDLSHolder.ID      = num;
                             serializable2.XDLSHolder.BeforeSerialization();
                             num++;
                         }
                     }
                 }
             }
         }
     }
 }
예제 #3
0
    void IXDLSContentWriter.WriteChildElement(string A_0, object A_1)
    {
        int num = 0x11;
        IDocumentSerializable serializable = A_1 as IDocumentSerializable;

        if (serializable != null)
        {
            this.method_1(A_0, serializable, false);
        }
        else
        {
            IXDLSSerializableCollection serializables = A_1 as IXDLSSerializableCollection;
            if (serializables != null)
            {
                this.method_2(A_0, serializables);
            }
            else if (A_1 is string)
            {
                this.xmlWriter_0.WriteStartElement(A_0);
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌶䀸䬺堼", num), BookmarkStart.b("搶䴸䤺吼儾♀", num));
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䄶堸场䠼娾", num), (string)A_1);
                this.xmlWriter_0.WriteEndElement();
            }
            else if (A_1 is int)
            {
                this.xmlWriter_0.WriteStartElement(A_0);
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌶䀸䬺堼", num), BookmarkStart.b("縶圸伺฼ാ", num));
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䄶堸场䠼娾", num), (int)A_1);
                this.xmlWriter_0.WriteEndElement();
            }
            else if (A_1 is float)
            {
                this.xmlWriter_0.WriteStartElement(A_0);
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌶䀸䬺堼", num), BookmarkStart.b("搶倸唺娼匾⑀", num));
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䄶堸场䠼娾", num), (float)A_1);
                this.xmlWriter_0.WriteEndElement();
            }
            else if (A_1 is bool)
            {
                this.xmlWriter_0.WriteStartElement(A_0);
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌶䀸䬺堼", num), BookmarkStart.b("甶嘸吺儼娾⁀ⵂ", num));
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䄶堸场䠼娾", num), A_1.ToString());
                this.xmlWriter_0.WriteEndElement();
            }
            else if (A_1 is Enum)
            {
                this.xmlWriter_0.WriteStartElement(A_0);
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌶䀸䬺堼", num), A_1.GetType().ToString());
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䄶堸场䠼娾", num), A_1.ToString());
                this.xmlWriter_0.WriteEndElement();
            }
            else
            {
                this.vmethod_0(A_0, A_1);
            }
        }
    }
예제 #4
0
 public void Deserialize(IDocumentSerializable value)
 {
     while (this.xmlReader_0.NodeType != XmlNodeType.Element)
     {
         this.xmlReader_0.Read();
     }
     this.method_3(value);
     value.XDLSHolder.AfterDeserialization(value);
 }
예제 #5
0
    private void method_1(string A_0, IDocumentSerializable A_1, bool A_2)
    {
        int num = 4;

        if (!A_1.XDLSHolder.SkipMe)
        {
            this.xmlWriter_0.WriteStartElement(A_0);
            if (A_2 && A_1.XDLSHolder.EnableID)
            {
                this.Spire.Doc.Interface.IXDLSAttributeWriter.WriteValue(BookmarkStart.b("䌩䠫", num), A_1.XDLSHolder.ID);
            }
            A_1.WriteXmlAttributes(this);
            A_1.WriteXmlContent(this);
            this.xmlWriter_0.WriteEndElement();
        }
    }
예제 #6
0
        private void method_3(IDocumentSerializable A_0)
        {
            int num = 8;

            if (A_0 == null)
            {
                this.xmlReader_0.Skip();
            }
            else
            {
                if (this.xmlReader_0.HasAttributes)
                {
                    if (this.xmlReader_0.MoveToAttribute(BookmarkStart.b("䜭启", num)))
                    {
                        A_0.XDLSHolder.ID = XmlConvert.ToInt32(this.xmlReader_0.GetAttribute(BookmarkStart.b("䜭启", num)));
                    }
                    A_0.ReadXmlAttributes(this);
                    this.xmlReader_0.MoveToElement();
                }
                bool flag  = !this.xmlReader_0.IsEmptyElement;
                int  depth = this.xmlReader_0.Depth;
                this.xmlReader_0.ReadStartElement();
                if (flag)
                {
                    while (this.xmlReader_0.Depth > depth)
                    {
                        if (this.xmlReader_0.EOF)
                        {
                            break;
                        }
                        if (this.xmlReader_0.NodeType != XmlNodeType.Element)
                        {
                            this.xmlReader_0.Read();
                        }
                        else if (!A_0.ReadXmlContent(this))
                        {
                            this.xmlReader_0.Skip();
                        }
                    }
                    if (this.xmlReader_0.NodeType == XmlNodeType.EndElement)
                    {
                        this.xmlReader_0.ReadEndElement();
                    }
                }
            }
        }
예제 #7
0
        public bool ReadChildElement(object value)
        {
            IDocumentSerializable serializable = value as IDocumentSerializable;

            if (serializable != null)
            {
                this.method_3(serializable);
            }
            else
            {
                IXDLSSerializableCollection serializables = value as IXDLSSerializableCollection;
                if (serializables == null)
                {
                    return(false);
                }
                this.method_4(serializables);
            }
            return(true);
        }
예제 #8
0
 public void AfterDeserialization(IDocumentSerializable owner)
 {
     if (this.dictionary_0 != null)
     {
         foreach (string str in this.dictionary_0.Keys)
         {
             IDocumentSerializable serializable2 = this.dictionary_0[str] as IDocumentSerializable;
             if (serializable2 != null)
             {
                 serializable2.XDLSHolder.AfterDeserialization(serializable2);
             }
             else
             {
                 IXDLSSerializableCollection serializables = this.dictionary_0[str] as IXDLSSerializableCollection;
                 if (serializables != null)
                 {
                     foreach (IDocumentSerializable serializable in serializables)
                     {
                         if (serializable != null)
                         {
                             serializable.XDLSHolder.AfterDeserialization(serializable);
                         }
                     }
                 }
             }
         }
     }
     if (this.dictionary_1 != null)
     {
         foreach (string str2 in this.dictionary_1.Keys)
         {
             int num = -1;
             if ((this.dictionary_1[str2] != null) && (this.dictionary_1[str2] is int))
             {
                 num = (int)this.dictionary_1[str2];
             }
             owner.RestoreReference(str2, num);
         }
     }
     this.method_0();
 }
예제 #9
0
 public void WriteHolder(IXDLSContentWriter writer)
 {
     if (this.dictionary_0 != null)
     {
         foreach (string str in this.dictionary_0.Keys)
         {
             writer.WriteChildElement(str, this.dictionary_0[str]);
         }
     }
     if (this.dictionary_1 != null)
     {
         foreach (string str2 in this.dictionary_1.Keys)
         {
             IDocumentSerializable serializable = this.dictionary_1[str2] as IDocumentSerializable;
             if (serializable != null)
             {
                 writer.WriteChildRefElement(str2, serializable.XDLSHolder.ID);
             }
         }
     }
 }
예제 #10
0
 public void method_0(IDocumentSerializable A_0)
 {
     A_0.XDLSHolder.BeforeSerialization();
     this.method_1(this.string_2, A_0, false);
 }