/// <summary> /// Creates an instance of a specified message type. /// </summary> public virtual IMessage CreateInstance(string msgType) { IMessage message; switch (msgType) { case Values.MsgType.Logon: message = new Logon(); break; case Values.MsgType.Logout: message = new Logout(); break; case Values.MsgType.Heartbeat: message = new Heartbeat(); break; case Values.MsgType.TestRequest: message = new TestRequest(); break; case Values.MsgType.ResendRequest: message = new ResendRequest(); break; case Values.MsgType.SequenceReset: message = new SequenceReset(); break; case Values.MsgType.Reject: message = new Reject(); break; default: message = new Message(msgType); break; } message.BeginString = _beginString; foreach (IField field in _fields) { message.Fields.Add(field); } return(message); }
public MessageHelperReject(IMessage message) : base(message) { _message = (Reject)message; }