public static int ToFIX(SessionRejectReason value) { switch (value) { case SessionRejectReason.InvalidTagNumber: return 0; case SessionRejectReason.RequiredTagMissing: return 1; case SessionRejectReason.TagNotDefined: return 2; case SessionRejectReason.UndefinedTag: return 3; case SessionRejectReason.TagSpecifiedWithoutAValue: return 4; case SessionRejectReason.ValueIsIncorrect: return 5; case SessionRejectReason.IncorrectDataFormat: return 6; case SessionRejectReason.DecryptionProblem: return 7; case SessionRejectReason.SignatureProblem: return 8; case SessionRejectReason.CompIDProblem: return 9; case SessionRejectReason.SendingTimeAccuracyProblem: return 10; case SessionRejectReason.InvalidMsgType: return 11; default: throw new ArgumentException(string.Format("", (object) value)); } }
protected override void Read(FixMessage msg) { this.text = msg[58] == null ? "" : msg[58].Value; this.refType = msg[372] == null ? "" : msg[372].Value; try { this.reason = (SessionRejectReason)(Byte.Parse((msg[373].Value))); } catch (Exception) { this.reason = SessionRejectReason.Others; } }
public override void onMessage(QuickFix44.Reject message, SessionID session) { // getting attributes RefMsgType refMsgType = message.getRefMsgType(); RefSeqNum refSeqNum = message.getRefSeqNum(); RefTagID refTagID = message.getRefTagID(); SessionRejectReason sessionRejectReason = message.getSessionRejectReason(); Text text = message.getText(); // firing event Console.WriteLine("QuickFix44.Reject: {0}, {1}, {2}, {3}, {4}", refMsgType, refSeqNum, refTagID, sessionRejectReason, text); }
public static int ToFIX(SessionRejectReason value) { switch (value) { case SessionRejectReason.InvalidTagNumber: return(0); case SessionRejectReason.RequiredTagMissing: return(1); case SessionRejectReason.TagNotDefined: return(2); case SessionRejectReason.UndefinedTag: return(3); case SessionRejectReason.TagSpecifiedWithoutAValue: return(4); case SessionRejectReason.ValueIsIncorrect: return(5); case SessionRejectReason.IncorrectDataFormat: return(6); case SessionRejectReason.DecryptionProblem: return(7); case SessionRejectReason.SignatureProblem: return(8); case SessionRejectReason.CompIDProblem: return(9); case SessionRejectReason.SendingTimeAccuracyProblem: return(10); case SessionRejectReason.InvalidMsgType: return(11); default: throw new ArgumentException(string.Format("", (object)value)); } }
/// <summary> /// Converts a SessionRejectReason to a string. /// </summary> /// <param name="value">A SessionRejectReason value.</param> /// <returns>The FIX string representation of a SessionRejectReason.</returns> public static string ConvertTo(SessionRejectReason enumType) { return((string)SessionRejectReasonConverter.toTable[enumType]); }