Deserialize() public method

Creates a new instance from the given bytes.
public Deserialize ( byte content ) : Value
content byte The binary content to create a new instance from.
return Value
コード例 #1
0
        /// <summary>
        /// Creates a new instance from the given bytes.
        /// </summary>
        /// <param name="content">The binary content to create a new instance from.</param>
        /// <returns>The new instance.</returns>
        public override Value Deserialize(byte[] content)
        {
            var cp = new ComplexPlotValue();

            using (var ds = Deserializer.Create(content))
            {
                cp.Deserialize(ds);
                var ctn = ds.GetBytes();
                cp.f = new FunctionValue().Deserialize(ctn) as FunctionValue;
            }

            return(cp);
        }
コード例 #2
0
ファイル: ComplexPlotValue.cs プロジェクト: FlorianRappl/YAMP
        /// <summary>
        /// Creates a new instance from the given bytes.
        /// </summary>
        /// <param name="content">The binary content to create a new instance from.</param>
        /// <returns>The new instance.</returns>
        public override Value Deserialize(byte[] content)
        {
            var cp = new ComplexPlotValue();

            using (var ds = Deserializer.Create(content))
            {
                cp.Deserialize(ds);
                var ctn = ds.GetBytes();
                cp.f = new FunctionValue().Deserialize(ctn) as FunctionValue;
            }

            return cp;
        }