Ejemplo n.º 1
0
		/// <summary>
		/// Only constructor for the class. No default available.
		/// </summary>
		/// <param name="symbol">The group symbol for which the corresponding subscription
		/// was created.</param>
		public MamdaMultiParticipantManager(string symbol)
		{
			mNotifiedConsolidatedCreate   =   false;
			mConsolidatedListeners        =   new ArrayList();
			mParticipants                 =   new HashMap();
			mHandlers                     =   new ArrayList();
			mSymbol                       =   symbol;
			mIsPrimaryParticipant         =   new NullableBool(true);
		}
 /// <summary>
 /// Only constructor for the class. No default available.
 /// </summary>
 /// <param name="symbol">The group symbol for which the corresponding subscription
 /// was created.</param>
 public MamdaMultiParticipantManager(string symbol)
 {
     mNotifiedConsolidatedCreate = false;
     mConsolidatedListeners      = new ArrayList();
     mParticipants         = new HashMap();
     mHandlers             = new ArrayList();
     mSymbol               = symbol;
     mIsPrimaryParticipant = new NullableBool(true);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Compare another object
        /// </summary>
        /// <param name="obj">Object to compare with</param>
        /// <returns>
        /// If both objects are the same, returns zero. If this object
        /// has a value but the other object does not, returns +1. If this
        /// object does not have a value, but the other object does have a
        /// value, returns -1. If both objects have a value, returns an
        /// indication of their relative values
        ///</returns>
        public int CompareTo(object obj)
        {
            NullableBool other = (NullableBool)obj;

            if (mHasValue)
            {
                if (other.mHasValue)
                {
                    return(mValue.CompareTo(other.mValue));
                }
                else
                {
                    return(1);
                }
            }
            else if (other.mHasValue)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 4
0
            public void onParticipantCreate(
				MamdaSubscription             subscription,
				MamdaMultiParticipantManager  manager,
				string                        participantId,
				NullableBool                   isPrimary)
            {
                MamdaTradeListener aTradeListener = new MamdaTradeListener();
                MamdaQuoteListener aQuoteListener = new MamdaQuoteListener();
                ComboTicker        aTicker        = new ComboTicker();

                aTradeListener.addHandler(aTicker);
                aQuoteListener.addHandler(aTicker);

                manager.addParticipantListener(aTradeListener, participantId);
                manager.addParticipantListener(aQuoteListener, participantId);
            }