/// <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 from the binary stream /// </summary> /// <param name="reader"></param> public override void Read(BinaryReader reader) { Value = ServerBinaryReader.ReadInt32(reader); }