public override dynamic Serialize(object thisObj) { DoCopyIfNotCheating((T)thisObj); using (var ms = new MemoryStream()) { var tproto = new TCompactProtocol(new TStreamTransport(ms, ms)); CodeGenObjSer.Write(tproto); SerBytes = ms.ToArray(); } return(SerBytes); }
protected override InheritedEntityThrift ToSerObject(T thisObj) { CodeGenObjSer = base.ToSerObject(thisObj); CodeGenObjSer.InjectFrom <FloatToDouble>(thisObj); // special call to inject the float (C#) into the double (thrift) return(CodeGenObjSer); }