YAMP.Plot2DValue.Serialize C# (CSharp) Method

Serialize() public method

Converts the given instance to an array of bytes.
public Serialize ( ) : byte[]
return byte[]
        public override byte[] Serialize()
        {
            using (var s = Serializer.Create())
            {
                Serialize(s);
                s.Serialize(IsLogX);
                s.Serialize(IsLogY);
                s.Serialize(Count);

                for (var i = 0; i < Count; i++)
                {
                    var points = this[i];
                    points.Serialize(s);
                    s.Serialize(points.Count);

                    for (int j = 0; j < points.Count; j++)
                    {
                        s.Serialize(points[j].X);
                        s.Serialize(points[j].Y);
                    }
                }

                return s.Value;
            }
        }