本文整理匯總了C#中QuickFix.Message.getHeader方法的典型用法代碼示例。如果您正苦於以下問題:C# Message.getHeader方法的具體用法?C# Message.getHeader怎麽用?C# Message.getHeader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類QuickFix.Message
的用法示例。
在下文中一共展示了Message.getHeader方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: toAdmin
public void toAdmin(Message message, SessionID sessionID)
{
// This is only for the TT dev environment. The production FIX Adapter does not require a password
MsgType msgType = new MsgType();
message.getHeader().getField(msgType);
TargetCompID targetCompID = new TargetCompID();
message.getHeader().getField(targetCompID);
if (msgType.ToString() == MsgType.Logon &&
(targetCompID.ToString() == "TTDEV9P" || targetCompID.ToString() == "TTDEV9O"))
{
const string password = "12345678";
RawData rawData = new RawData(password);
message.getHeader().setField(rawData);
}
// End TT Dev environment case
}
示例2: fromAdmin
public void fromAdmin(Message message, SessionID sessionID)
{
if (!isTimerAdjusted)
{
SendingTime sendingTime = new SendingTime();
message.getHeader().getField(sendingTime);
Utils.AdjustTime(sendingTime.getValue());
isTimerAdjusted = true;
}
}
示例3: fromAdmin
public void fromAdmin(Message message, SessionID sessionID)
{
if(!isTimerAdjusted)
{
SendingTime sendingTime = new SendingTime();
message.getHeader().getField(sendingTime);
Utils.AdjustTime(sendingTime.getValue());
isTimerAdjusted = true;
}
//AddText("fromAdmin " + message + Environment.NewLine);
}
示例4: ServerQuickFix_newSendOrderRequest
long ServerQuickFix_newSendOrderRequest(Order o)
{
QuickFix.Message message = new QuickFix.Message();
QuickFix.Message.Header header = message.getHeader();
header.setField(new BeginString(FIXID));
header.setField(new SenderCompID(SenderCompId));
header.setField(new TargetCompID(TargetCompId));
header.setField(new MsgType(CANCEL));
message.setField(new OrigClOrdID(o.id.ToString()));
message.setField(new ClOrdID(o.id.ToString()));
message.setField(new Symbol(o.symbol));
message.setField(new Side(o.side ? Side.BUY : Side.SELL));
//message.setField(new Text("Cancel My Order!"));
Session.sendToTarget(message);
return 0;
}