Beispiel #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);
            }
        }
Beispiel #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);
 }
Beispiel #5
0
 /// <summary>
 /// Writes to the given binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadDateTime(reader);
 }
Beispiel #6
0
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadChar(reader);
 }
Beispiel #7
0
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadDecimal(reader);
 }
Beispiel #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);
 }
Beispiel #10
0
 /// <summary>
 /// Reads from the binary stream
 /// </summary>
 /// <param name="reader"></param>
 public override void Read(BinaryReader reader)
 {
     Value = ServerBinaryReader.ReadByteArray(reader);
 }
Beispiel #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);
 }