Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 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++;
                         }
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 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);
            }
        }
    }
Exemplo n.º 4
0
 private void method_2(string A_0, IXDLSSerializableCollection A_1)
 {
     if (A_1.Count > 0)
     {
         this.xmlWriter_0.WriteStartElement(A_0);
         foreach (IDocumentSerializable serializable in A_1)
         {
             if (serializable != null)
             {
                 this.method_1(A_1.TagItemName, serializable, true);
             }
         }
         this.xmlWriter_0.WriteEndElement();
     }
 }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
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();
 }