本文整理匯總了C#中QuickFix.SessionID.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# SessionID.ToString方法的具體用法?C# SessionID.ToString怎麽用?C# SessionID.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類QuickFix.SessionID
的用法示例。
在下文中一共展示了SessionID.ToString方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FromApp
public void FromApp(QuickFix.Message msg, SessionID sessionID)
{
Console.WriteLine("FromApp - " + msg.ToString() + "@" + sessionID.ToString());
try
{
Crack(msg, sessionID);
}
catch (Exception ex)
{
Console.WriteLine("==Cracker exception==");
Console.WriteLine(ex.ToString());
Console.WriteLine(ex.StackTrace);
}
}
示例2: TestToString
public void TestToString()
{
SessionID sessionID = new SessionID("FIX.4.2", "SENDER", "TARGET");
Assert.That(sessionID.ToString(), Is.EqualTo("FIX.4.2:SENDER->TARGET"));
sessionID = new SessionID("FIX.4.2", "SENDER", "TARGET", "QUALIFIER");
Assert.That(sessionID.ToString(), Is.EqualTo("FIX.4.2:SENDER->TARGET:QUALIFIER"));
sessionID = new SessionID("FIX.4.2", "SENDER", "SENDERSUB", "TARGET", "TARGETSUB");
Assert.That(sessionID.ToString(), Is.EqualTo("FIX.4.2:SENDER/SENDERSUB->TARGET/TARGETSUB"));
sessionID = new SessionID("FIX.4.2", "SENDER", "SENDERSUB", "SENDERLOC", "TARGET", "TARGETSUB", "TARGETLOC");
Assert.That(sessionID.ToString(), Is.EqualTo("FIX.4.2:SENDER/SENDERSUB/SENDERLOC->TARGET/TARGETSUB/TARGETLOC"));
sessionID = new SessionID("FIX.4.2", "SENDER", "SENDERSUB", "SENDERLOC", "TARGET", "TARGETSUB", "TARGETLOC", "QUALIFIER");
Assert.That(sessionID.ToString(), Is.EqualTo("FIX.4.2:SENDER/SENDERSUB/SENDERLOC->TARGET/TARGETSUB/TARGETLOC:QUALIFIER"));
}
示例3: Set
/// <summary>
/// Add new session config
/// </summary>
/// <param name="sessionID">ID of session for which to add config</param>
/// <param name="settings">session config</param>
public void Set(SessionID sessionID, QuickFix.Dictionary settings)
{
if (Has(sessionID))
throw new ConfigError("Duplicate Session " + sessionID.ToString());
settings.SetString(BEGINSTRING, sessionID.BeginString);
settings.SetString(SENDERCOMPID, sessionID.SenderCompID);
if (SessionID.IsSet(sessionID.SenderSubID))
settings.SetString(SENDERSUBID, sessionID.SenderSubID);
if (SessionID.IsSet(sessionID.SenderLocationID))
settings.SetString(SENDERLOCID, sessionID.SenderLocationID);
settings.SetString(TARGETCOMPID, sessionID.TargetCompID);
if (SessionID.IsSet(sessionID.TargetSubID))
settings.SetString(TARGETSUBID, sessionID.TargetSubID);
if (SessionID.IsSet(sessionID.TargetLocationID))
settings.SetString(TARGETLOCID, sessionID.TargetLocationID);
settings.Merge(defaults_);
Validate(settings);
settings_[sessionID] = settings;
}
示例4: Pair
public Pair(ClOrdID clOrdID, SessionID sessionID)
{
this.clOrdID = clOrdID;
this.sessionID = sessionID;
hashCode =
("C:" + clOrdID.ToString() + "S:" + sessionID.ToString()).GetHashCode();
}
示例5: OnLogout
public void OnLogout(SessionID sessionID)
{
Console.WriteLine("Logout - " + sessionID.ToString());
}
示例6: FromAdmin
public void FromAdmin(QuickFix.Message msg, SessionID sessionID)
{
Console.WriteLine("FromAdmin - " + msg.ToString() + "@" + sessionID.ToString());
}
示例7: ToApp
public void ToApp(QuickFix.Message msg, SessionID sessionID)
{
Console.WriteLine("ToApp - " + msg.ToString() + "@" + sessionID.ToString());
}
示例8: OnLogout
public void OnLogout(SessionID sessionID)
{
Puts("Logout - " + sessionID.ToString());
}
示例9: SessionEquals
protected bool SessionEquals(SessionID sessionID1, SessionID sessionID2)
{
if (sessionID1 == null || sessionID2 == null)
return false;
else
return sessionID1.ToString() == sessionID2.ToString();
}
示例10: OnLogout
public void OnLogout(SessionID sessionID)
{
Console.WriteLine(sessionID.ToString() + "logged out");
m_ProductSubscription.Clear();
}
示例11: OnLogon
public void OnLogon(SessionID sessionID)
{
Console.WriteLine(sessionID.ToString() + "logged on");
}