本文整理汇总了C#中Wombat.MamaMsg.tryI64方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.tryI64方法的具体用法?C# MamaMsg.tryI64怎么用?C# MamaMsg.tryI64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wombat.MamaMsg
的用法示例。
在下文中一共展示了MamaMsg.tryI64方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: updateFundamentalFields
private void updateFundamentalFields(MamaMsg msg)
{
/*
* NOTE: fields which are enums can be pubished as integers if feedhandler
* uses mama-publish-enums-as-ints. It may also be possible for a feed to
* publish the numerical value as a string. All enumerated fields must be handled
* by getting the value based on the field type.
*/
if (msg.tryDateTime(MamdaFundamentalFields.SRC_TIME, ref mSrcTimeStr))
mSrcTimeStrFieldState = MamdaFieldState.MODIFIED;
if (msg.tryDateTime(MamdaFundamentalFields.ACTIVITY_TIME, ref mActTimeStr))
mActTimeStrFieldState = MamdaFieldState.MODIFIED;
if (msg.tryString(MamdaFundamentalFields.CORP_ACT_TYPE, ref mCorpActType))
mCorpActTypeFieldState = MamdaFieldState.MODIFIED;
if(msg.tryField (MamdaFundamentalFields.DIVIDEND_FREQ, ref mTmpfield))
{
mDivFreq = getFieldAsString(mTmpfield);
mDivFreqFieldState = MamdaFieldState.MODIFIED;
}
if (msg.tryString(MamdaFundamentalFields.DIVIDEND_EX_DATE, ref mDivExDate))
mDivExDateFieldState = MamdaFieldState.MODIFIED;
if(msg.tryString(MamdaFundamentalFields.DIVIDEND_PAY_DATE, ref mDivPayDate))
mDivPayDateFieldState = MamdaFieldState.MODIFIED;
if (msg.tryString(MamdaFundamentalFields.DIVIDEND_REC_DATE, ref mDivRecordDate))
mDivRecordDateFieldState = MamdaFieldState.MODIFIED;
if(msg.tryString(MamdaFundamentalFields.DIVIDEND_CURRENCY, ref mDivCurrency))
mDivCurrencyFieldState = MamdaFieldState.MODIFIED;
if (msg.tryString(MamdaFundamentalFields.MRKT_SEGM_NATIVE, ref mMrktSegmNative))
mMrktSegmNativeFieldState = MamdaFieldState.MODIFIED;
if (msg.tryString(MamdaFundamentalFields.MRKT_SECT_NATIVE, ref mMrktSectNative))
mMrktSectNativeFieldState = MamdaFieldState.MODIFIED;
if(msg.tryField (MamdaFundamentalFields.MRKT_SEGMENT, ref mTmpfield))
{
mMarketSegment = getFieldAsString(mTmpfield);
mMarketSegmentFieldState = MamdaFieldState.MODIFIED;
}
if(msg.tryField (MamdaFundamentalFields.MRKT_SECTOR, ref mTmpfield))
{
mMarketSector = getFieldAsString(mTmpfield);
mMarketSectorFieldState = MamdaFieldState.MODIFIED;
}
if (msg.tryI64 (MamdaFundamentalFields.SHARES_OUT, ref mSharesOut))
mSharesOutFieldState = MamdaFieldState.MODIFIED;
if (msg.tryI64 (MamdaFundamentalFields.SHARES_FLOAT, ref mSharesFloat))
mSharesFloatFieldState = MamdaFieldState.MODIFIED;
if (msg.tryI64 (MamdaFundamentalFields.SHARES_AUTH, ref mSharesAuth))
mSharesAuthFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.DIVIDEND_PRICE, ref mDividendPrice))
mDividendPriceFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.EARN_PER_SHARE, ref mEarnPerShare))
mEarnPerShareFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.VOLATILITY, ref mVolatility))
mVolatilityFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.PRICE_EARN_RATIO, ref mPeRatio))
mPeRatioFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.YIELD, ref mYield))
mYieldFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.HIST_VOLATILITY, ref mHistVolatility))
mHistVolatilityFieldState = MamdaFieldState.MODIFIED;
if (msg.tryF64(MamdaFundamentalFields.RISK_FREE_RATE, ref mRiskFreeRate))
mRiskFreeRateFieldState = MamdaFieldState.MODIFIED;
}