internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer) { FFTgt_H2G_Ticket_Redemption_Close tgt = new FFTgt_H2G_Ticket_Redemption_Close(); tgt.Status = buffer[0].GetAppId <FF_GmuId_ResponseStatus_Types, FF_AppId_ResponseStatus_Types>(); return(tgt); }
public void Entity_TicketRedeem_End_H2G() { FFMsg_H2G msg = FreeformEntityFactory.CreateEntity<FFMsg_H2G>(FF_FlowDirection.H2G, new FFCreateEntityRequest_H2G() { PollCode = FF_AppId_H2G_PollCodes.FreeformResponse, SessionID = FF_AppId_SessionIds.Tickets, TransactionID = 1, }); FFTgt_B2B_TicketInfo tgt = new FFTgt_B2B_TicketInfo(); msg.AddTarget(tgt); FFTgt_H2G_Ticket_Redemption_Close tgt2 = new FFTgt_H2G_Ticket_Redemption_Close(); tgt.AddTarget(tgt2); tgt2.Status = FF_AppId_ResponseStatus_Types.Fail; byte[] buffer = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.H2G, msg); string sBuffer = buffer.GetConvertBytesToHexString(string.Empty); Assert.AreEqual(sBuffer, "[05][FB][8A][01][00][01][00][01][00][04][0A][02][04][00][5F]"); }
public override void GetTargetData(IFreeformEntity_MsgTgt tgt, ref List <byte> buffer) { FFTgt_H2G_Ticket_Redemption_Close tgt2 = tgt as FFTgt_H2G_Ticket_Redemption_Close; buffer.SetValue(tgt2.Status.GetGmuIdInt8()); }
internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer) { FFTgt_H2G_Ticket_Redemption_Close tgt = new FFTgt_H2G_Ticket_Redemption_Close(); tgt.Status = buffer[0].GetAppId<FF_GmuId_ResponseStatus_Types, FF_AppId_ResponseStatus_Types>(); return tgt; }