public static writeInt ( int value, |
||
value | int | |
writer | ||
return | void |
public bool marshall(Stream d) { try{ BinaryWriter writer = new BinaryWriter(d); if (_props == null) { _props = new Dictionary <string, string>(); } RpcBinarySerializer.writeInt(_props.Count, writer); foreach (KeyValuePair <string, string> kv in _props) { RpcBinarySerializer.writeString(kv.Key, writer); RpcBinarySerializer.writeString(kv.Value, writer); } } catch (Exception e) { return(false); } return(true); }
//刚才出去吃麦,看到一只dog在贴单子,一过去,车开走了,那个沮丧的样子哦,还一直呆在那里与正拍摄的我进行对视 // 车子,单子,票子奋斗的dog public Stream marshall() { // to be continue.. MemoryStream stream = new MemoryStream(); BinaryWriter writer = new BinaryWriter(stream); RpcBinarySerializer.writeByte((byte)RpcConstValue.MSGTYPE_RPC, writer); RpcBinarySerializer.writeInt(this.sequence, writer); RpcBinarySerializer.writeByte((byte)this.calltype, writer); RpcBinarySerializer.writeShort((short)this.ifidx, writer); RpcBinarySerializer.writeShort((short)this.opidx, writer); RpcBinarySerializer.writeInt(this.errcode, writer); RpcBinarySerializer.writeByte((byte)this.paramsize, writer); RpcBinarySerializer.writeShort((short)this.call_id, writer); this.extra.marshall(stream); if (this.paramstream != null) { writer.Write(this.paramstream); } return(stream); }