ReadInt16() public method

public ReadInt16 ( ) : short
return short
Example #1
0
        /// <summary>
        /// Read a date.
        /// </summary>
        /// <remarks>
        /// Type declaration:
        /// <c>time-zone = S16
        /// date-type = date-marker DOUBLE time-zone</c>
        /// </remarks>
        private static void ReadDate(AmfStreamReader reader, XmlWriter output = null)
        {
            //Dates are represented as an Unix time stamp, but in milliseconds
            var milliseconds = reader.ReadDouble();

            //Value indicates a timezone, but it should not be used
            reader.ReadInt16();

            if (output != null)
            {
                output.WriteStartElement(AmfxContent.Date);
                var result = milliseconds.ToString();
                output.WriteValue(result);
                output.WriteEndElement();
            }
        }