Exemple #1
0
        /// <summary>
        /// Reads parameter from the given binary stream
        /// </summary>
        /// <param name="reader"></param>
        public override void Read(BinaryReader reader)
        {
            byte first = ServerBinaryReader.ReadByte(reader);

            if (first == NULL)
            {
                Value = null;
            }
            else
            {
                Value = NetCommand.Parse(reader);
            }
        }
Exemple #2
0
        /// <summary>
        /// Parses a new IParameter from the given binary reader
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public static IParameter Parse(BinaryReader reader)
        {
            var name = ServerBinaryReader.ReadTinyString(reader);
            var type = ServerBinaryReader.ReadInt32(reader);

            var cinfo = ParameterTypeMap[type]
                        as DynamicObjectCreator;
            var param = cinfo.Invoke() as IParameter;

            param.Name = name;
            param.Read(reader);
            return(param);
        }
 /// <summary>
 /// Reads parameter from the given binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadBoolean(reader);
 }
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadUInt16(reader);
 }
Exemple #5
0
 /// <summary>
 /// Writes to the given binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadDateTime(reader);
 }
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadChar(reader);
 }
Exemple #7
0
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadDecimal(reader);
 }
Exemple #8
0
 /// <summary>
 /// Reads from the given binary stream
 /// </summary>
 /// <param name="reader"></param>
 public void Read(BinaryReader reader)
 {
     Name = ServerBinaryReader.ReadTinyString(reader);
     Parameters.Read(reader);
 }
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadString(reader);
 }
Exemple #10
0
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadByteArray(reader);
 }
Exemple #11
0
 /// <summary>
 /// Reads from binary stream
 /// </summary>
 /// <param name="reader"></param>
 public void Read(BinaryReader reader)
 {
     Okey    = ServerBinaryReader.ReadBoolean(reader);
     Message = ServerBinaryReader.ReadShortString(reader);
     Parameters.Read(reader);
 }