Exemplo n.º 1
0
        private ISpEventMessage GetMsg(MyMsgId eventId)
        {
            //Console.WriteLine("-- Sending msg:{0}", eventId.ToString());

            Log.Info("", "", String.Format("---------------------- Sending msg:{0}", eventId));
            return(new MyBaseMsg(MyMsgType.SimpleMsg, eventId));
        }
Exemplo n.º 2
0
        public ISpEventMessage Response(ISpEventMessage msg)
        {
            MyMsgId   eventType = SpConverter.IntToEnum <MyMsgId>(msg.EventId);
            MyMsgType msgType   = SpConverter.IntToEnum <MyMsgType>(msg.TypeId);

            // All my messages are Simple Types so I do not need any other info for types. Otherwise I would need a switch
            return(new MyBaseMsg(msgType, eventType, msg.Priority)
            {
                ReturnCode = msg.ReturnCode,
                StringPayload = msg.StringPayload,
                ReturnStatus = msg.ReturnStatus
            });
        }