public void OnLogon(SessionID sessionID) { //Console.WriteLine("Logon - " + sessionID.ToString()); //this.ActiveSessionID = sessionID; //Session tempSession = Session.LookupSession(sessionID); //tempSession. //IsConnected = true; HashSet <QuickFix.SessionID> sessionIDSet = MySessionSettings.GetSessions(); //sessionIDSet.ElementAt(0).SenderLocationID if (sessionID.TargetCompID.CompareTo(sessionIDSet.ElementAt(0).TargetCompID) == 0) { //orderSession = Session.LookupSession(sessionID); if (OrderSessionLogonEvent != null) { OrderSessionLogonEvent(); } } else { //priceSession = Session.LookupSession(sessionID); if (PriceSessionLogonEvent != null) { PriceSessionLogonEvent(); } } }
public void OnLogout(SessionID sessionID) { Console.WriteLine("Logout - " + sessionID.ToString()); //IsConnected = false; HashSet <QuickFix.SessionID> sidset = MySessionSettings.GetSessions(); if (sessionID.TargetCompID.CompareTo(sidset.ElementAt(0).TargetCompID) == 0) { //orderSession = Session.LookupSession(sessionID); if (OrderSessionLogoutEvent != null) { OrderSessionLogoutEvent(); } } else { //priceSession = Session.LookupSession(sessionID); if (PriceSessionLogoutEvent != null) { PriceSessionLogoutEvent(); } } }
public void OnCreate(SessionID sessionID) { //Console.WriteLine("Logon - " + sessionID.ToString()); HashSet <QuickFix.SessionID> sidset = MySessionSettings.GetSessions(); if (sessionID.TargetCompID.CompareTo(sidset.ElementAt(0).TargetCompID) == 0) { orderSession = Session.LookupSession(sessionID); } else { priceSession = Session.LookupSession(sessionID); } //_session = Session.LookupSession(sessionID); }