本文整理匯總了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;
}