Пример #1
0
        private static void addToUpdatersList(
            AuctionUpdate[]         updaters,
            MamaFieldDescriptor fieldDesc,
            AuctionUpdate updater)
        {
            if (fieldDesc == null)
            {
                return;
            }
            int fieldId = fieldDesc.getFid();

            if (fieldId <= mMaxFid)
            {
                updaters[fieldId] = updater;
            }
        }
Пример #2
0
        private static AuctionUpdate[] createUpdaters()
        {
            mMaxFid = MamdaAuctionFields.getMaxFid();
            AuctionUpdate[] updaters = new AuctionUpdate[mMaxFid + 1];

            addToUpdatersList(updaters, MamdaCommonFields.SYMBOL, new MamdaAuctionSymbol());
            addToUpdatersList(updaters, MamdaCommonFields.ISSUE_SYMBOL, new MamdaAuctionIssueSymbol());
            addToUpdatersList(updaters, MamdaCommonFields.PART_ID, new MamdaAuctionPartId());
            addToUpdatersList(updaters, MamdaCommonFields.SRC_TIME, new MamdaAuctionSrcTime());
            addToUpdatersList(updaters, MamdaCommonFields.ACTIVITY_TIME, new MamdaAuctionActivityTime());
            addToUpdatersList(updaters, MamdaCommonFields.LINE_TIME, new MamdaAuctionLineTime());
            addToUpdatersList(updaters, MamdaCommonFields.SEND_TIME, new MamdaAuctionSendTime());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_PRICE, new MamdaAuctionUncrossPrice());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_VOLUME, new MamdaAuctionUncrossVolume());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_PRICE_IND, new MamdaAuctionUncrossPriceInd());

            return(updaters);
        }
Пример #3
0
            public void onField(MamaMsg msg,
                                MamaMsgField field,
                                object closure)
            {
                try
                {
                    int fieldId = field.getFid();
                    if (fieldId <= mMaxFid)
                    {
                        AuctionUpdate updater = (AuctionUpdate)mUpdaters[fieldId];

                        if (updater != null)
                        {
                            updater.onUpdate(mListener, field);
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw new MamdaDataException(ex.Message, ex);
                }
            }
Пример #4
0
        private static AuctionUpdate[] createUpdaters()
        {
            mMaxFid = MamdaAuctionFields.getMaxFid();
            AuctionUpdate[] updaters = new AuctionUpdate[mMaxFid+1];

            addToUpdatersList(updaters, MamdaCommonFields.SYMBOL, new MamdaAuctionSymbol());
            addToUpdatersList(updaters, MamdaCommonFields.ISSUE_SYMBOL, new MamdaAuctionIssueSymbol());
            addToUpdatersList(updaters, MamdaCommonFields.PART_ID, new MamdaAuctionPartId());
            addToUpdatersList(updaters, MamdaCommonFields.SRC_TIME, new MamdaAuctionSrcTime());
            addToUpdatersList(updaters, MamdaCommonFields.ACTIVITY_TIME, new MamdaAuctionActivityTime());
            addToUpdatersList(updaters, MamdaCommonFields.LINE_TIME, new MamdaAuctionLineTime());
            addToUpdatersList(updaters, MamdaCommonFields.SEND_TIME, new MamdaAuctionSendTime());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_PRICE, new MamdaAuctionUncrossPrice());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_VOLUME, new MamdaAuctionUncrossVolume());
            addToUpdatersList(updaters, MamdaAuctionFields.UNCROSS_PRICE_IND, new MamdaAuctionUncrossPriceInd());

            return updaters;
        }
Пример #5
0
        private static void addToUpdatersList(
			AuctionUpdate[]		updaters,
			MamaFieldDescriptor	fieldDesc,
			AuctionUpdate			updater)
        {
            if (fieldDesc == null) return;
            int fieldId = fieldDesc.getFid();
            if (fieldId <= mMaxFid)
            {
                updaters[fieldId] = updater;
            }
        }