本文整理汇总了C#中Wombat.MamaMsg.tryU64方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.tryU64方法的具体用法?C# MamaMsg.tryU64怎么用?C# MamaMsg.tryU64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wombat.MamaMsg
的用法示例。
在下文中一共展示了MamaMsg.tryU64方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: handleRecap
private void handleRecap(
MamdaSubscription subscription,
MamaMsg msg)
{
// Synchronize the current Order Book in case a snapshot is being created
if (mFullBook != null)
{
lock (mFullBook)
{
msg.tryU64(MamaReservedFields.SenderId, ref mPreviousSenderId);
handleStandardFields(subscription, msg, false);
if (createDeltaFromMamaMsg(mTempmDeltaBook, msg))
{
mDeltaBook.setSymbol(subscription.getSymbol());
mDeltaBook.setBookTime(msg.getDateTime(MamdaOrderBookFields.BOOK_TIME, mSrcTime));
mDeltaBook.setAsDeltaDifference(mFullBook, mTempmDeltaBook);
mFullBook.copy(mTempmDeltaBook);
mFullBook.setSymbol(subscription.getSymbol());
mFullBook.setBookTime(mDeltaBook.getBookTime());
mFullBook.setIsConsistent(true);
invokeRecapHandlers(subscription, msg);
}
}
}
else
{
handleStandardFields(subscription, msg, false);
// Set the delta to be the contents of the recap.
if (createDeltaFromMamaMsg(mDeltaBook, msg))
{
mDeltaBook.setSymbol(subscription.getSymbol());
invokeRecapHandlers(subscription, msg);
}
}
mGotInitial = true;
}
示例2: handleStandardFields
private void handleStandardFields(
MamdaSubscription subscription,
MamaMsg msg,
bool checkSeqNum)
{
long seqNum = 0;
msg.tryI64(MamaReservedFields.SeqNum, ref seqNum);
ulong senderId = 0;
msg.tryU64(MamaReservedFields.SenderId, ref senderId);
if (checkSeqNum)
{
if ((seqNum != 0) && (mSeqNum != (seqNum - 1)))
{
mGapBegin = mSeqNum + 1;
mGapEnd = seqNum - 1;
invokeGapHandlers(subscription, msg);
if (mFullBook != null && senderId == mPreviousSenderId)
{
mFullBook.setIsConsistent(false);
}
}
}
mSeqNum = seqNum;
mPreviousSenderId = senderId;
msg.tryI64(MamdaOrderBookFields.SEQNUM, ref mEventSeqNum);
msg.tryDateTime(MamdaOrderBookFields.SRC_TIME, ref mSrcTime);
msg.tryDateTime(MamdaOrderBookFields.ACTIVITY_TIME, ref mActTime);
}
示例3: getEntriesInfo
private bool getEntriesInfo(MamaMsg entMsg)
{
int priceLevelEntryActionInt = 0;
ulong mPriceLevelEntrySizeUlong = 0;
if (entMsg.tryI32(MamdaOrderBookFields.ENTRY_ACTION, ref priceLevelEntryActionInt))
{
mPriceLevelEntryAction = (sbyte) priceLevelEntryActionInt;
}
entMsg.tryU64 (MamdaOrderBookFields.ENTRY_SIZE, ref mPriceLevelEntrySizeUlong);
mPriceLevelEntrySize = (long) mPriceLevelEntrySizeUlong;
mPriceLevelEntryTime = entMsg.getDateTime(MamdaOrderBookFields.ENTRY_TIME, mPriceLevelTime);
if(entMsg.tryStringAnsi (MamdaOrderBookFields.ENTRY_ID, ref mPriceLevelEntryIdIntPtr))
{
return true;
}
else
{
return false;
}
}