SwfDotNet.IO.Tags.Types.FillStyleCollection.Serialize C# (CSharp) Method

Serialize() public method

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
return void
        public void Serialize(XmlWriter writer)
        {
            writer.WriteStartElement("FillStyleArray");
            IEnumerator fillStyles = this.GetEnumerator();
            while (fillStyles.MoveNext())
                ((FillStyle)fillStyles.Current).Serialize(writer);
            writer.WriteEndElement();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Serializes the specified writer.
        /// </summary>
        /// <param name="writer">Writer.</param>
        public void Serialize(XmlWriter writer)
        {
            writer.WriteStartElement("ShapeWithStyle");
            base.SerializeBinarySize(writer);

            if (fillStyleArray != null)
            {
                fillStyleArray.Serialize(writer);
            }
            if (lineStyleArray != null)
            {
                lineStyleArray.Serialize(writer);
            }
            if (shapes != null)
            {
                ShapeWithStyle.NumFillBits = 0;
                ShapeWithStyle.NumLineBits = 0;
                if (fillStyleArray != null && fillStyleArray.Count != 0)
                {
                    ShapeWithStyle.NumFillBits = BufferedBinaryWriter.GetNumBits((uint)fillStyleArray.Count);
                }
                if (lineStyleArray != null && lineStyleArray.Count != 0)
                {
                    ShapeWithStyle.NumLineBits = BufferedBinaryWriter.GetNumBits((uint)lineStyleArray.Count);
                }

                shapes.Serialize(writer);

                ShapeWithStyle.NumFillBits = 0;
                ShapeWithStyle.NumLineBits = 0;
            }
            writer.WriteEndElement();
        }
All Usage Examples Of SwfDotNet.IO.Tags.Types.FillStyleCollection::Serialize