當前位置: 首頁>>代碼示例>>C#>>正文


C# MamdaSubscription.getSymbol方法代碼示例

本文整理匯總了C#中Wombat.MamdaSubscription.getSymbol方法的典型用法代碼示例。如果您正苦於以下問題:C# MamdaSubscription.getSymbol方法的具體用法?C# MamdaSubscription.getSymbol怎麽用?C# MamdaSubscription.getSymbol使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Wombat.MamdaSubscription的用法示例。


在下文中一共展示了MamdaSubscription.getSymbol方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: onError

        public void onError(
			MamdaSubscription   subscription,
			MamdaErrorSeverity  severity,
			MamdaErrorCode      errorCode,
			string              errorStr)
        {
            Console.WriteLine("Error (" + subscription.getSymbol() + "): ");
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:8,代碼來源:ComboTicker.cs

示例2: onQuoteClosing

        public void onQuoteClosing(
			MamdaSubscription   sub,
			MamdaQuoteListener  listener,
			MamaMsg             msg,
			MamdaQuoteClosing   closingEvent,
			MamdaQuoteRecap     recap)
        {
            Console.WriteLine("Quote Closing (" + sub.getSymbol() + "): ");
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:9,代碼來源:ComboTicker.cs

示例3: handleUpdateImpl

        private void handleUpdateImpl(
			MamdaSubscription subscription,
			MamaMsg msg)
        {
            handleStandardFields(subscription, msg, true);
            if (createDeltaFromMamaMsg(mDeltaBook, msg))
            {

                mDeltaBook.setSymbol(subscription.getSymbol());
                mDeltaBook.setBookTime(msg.getDateTime(MamdaOrderBookFields.BOOK_TIME, mSrcTime));
                if (mFullBook != null)
                {
                    if (mUpdateInconsistentBook || mFullBook.getIsConsistent())
                    {
                        mFullBook.apply(mDeltaBook);
                    }

                    mFullBook.setBookTime(mDeltaBook.getBookTime());
                }
                if (mHandlers.Count > 0)
                {
                    if (mUpdateInconsistentBook || (mFullBook == null) || mFullBook.getIsConsistent())
                    {
                        invokeDeltaHandlers(subscription, msg);
                    }
                }
            }
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:28,代碼來源:MamdaOrderBookListener.cs

示例4: 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;
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:36,代碼來源:MamdaOrderBookListener.cs

示例5: handleClear

        private void handleClear(
			MamdaSubscription subscription,
			MamaMsg msg)
        {
            // Synchronize the current Order Book in case a snapshot is being created
            if (mFullBook != null)
            {
                lock (mFullBook)
                {
                    handleStandardFields(subscription, msg, false);

                    mDeltaBook.setSymbol(subscription.getSymbol());
                    mDeltaBook.setAsDeltaDeleted(mFullBook);
                    mFullBook.clear();
                    mFullBook.setSymbol(subscription.getSymbol());
                    mFullBook.setIsConsistent(true);
                }
            }
            else
            {
                handleStandardFields(subscription, msg, false);
            }
            invokeClearHandlers(subscription, msg);
            mGotInitial = true;
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:25,代碼來源:MamdaOrderBookListener.cs

示例6: onTradeCorrection

        public void onTradeCorrection(
			MamdaSubscription        sub,
			MamdaTradeListener       listener,
			MamaMsg                  msg,
			MamdaTradeCorrection     correction,
			MamdaTradeRecap          recap)
        {
            Console.WriteLine("Trade correction (" + sub.getSymbol() + "): ");
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:9,代碼來源:ComboTicker.cs

示例7: onTradeCancelOrError

        public void onTradeCancelOrError(
			MamdaSubscription        sub,
			MamdaTradeListener       listener,
			MamaMsg                  msg,
			MamdaTradeCancelOrError  cancelOrError,
			MamdaTradeRecap          recap)
        {
            Console.WriteLine("Trade error/cancel (" + sub.getSymbol() + "): ");
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:9,代碼來源:ComboTicker.cs

示例8: onStale

        public void onStale(
			MamdaSubscription   subscription,
			mamaQuality         quality)
        {
            Console.WriteLine("Stale (" + subscription.getSymbol() + "): ");
        }
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:6,代碼來源:ComboTicker.cs


注:本文中的Wombat.MamdaSubscription.getSymbol方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。