Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public Serial RegisterAITrigger(BaseAITrigger aiTrigger)
        {
            aiTrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter(m_LockAITrigger);
            {
                m_AITrigger.Add(aiTrigger.AITriggerType, aiTrigger);
            }
            Monitor.Exit(m_LockAITrigger);

            return(aiTrigger.Serial);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="nTriggerID"></param>
        public bool RemoveAITrigger(BaseAITrigger aiTrigger)
        {
            bool l_bReturn = false;

            Monitor.Enter(m_LockAITrigger);
            {
                l_bReturn = m_AITrigger.Remove(aiTrigger.AITriggerType, aiTrigger);
            }
            Monitor.Exit(m_LockAITrigger);

            return(l_bReturn);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public BaseAITrigger RegisterAITrigger(long iAIEventType, AIProcessPriority processPriority, TimeSpan expirationTimeSpan)
        {
            BaseAITrigger l_newBaseAITrigger = new BaseAITrigger(iAIEventType, processPriority, expirationTimeSpan);

            l_newBaseAITrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter(m_LockAITrigger);
            {
                m_AITrigger.Add(l_newBaseAITrigger.AITriggerType, l_newBaseAITrigger);
            }
            Monitor.Exit(m_LockAITrigger);

            return(l_newBaseAITrigger);
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public BaseAITrigger RegisterAITrigger(long iAIEventType)
        {
            BaseAITrigger l_newBaseAITrigger = new BaseAITrigger(iAIEventType);

            l_newBaseAITrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter(m_LockAITrigger);
            {
                m_AITrigger.Add(l_newBaseAITrigger.AITriggerType, l_newBaseAITrigger);
            }
            Monitor.Exit(m_LockAITrigger);

            return(l_newBaseAITrigger);
        }
Esempio n. 5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public Serial RegisterAITrigger( BaseAITrigger aiTrigger )
        {
            aiTrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter( m_LockAITrigger );
            {
                m_AITrigger.Add( aiTrigger.AITriggerType, aiTrigger );
            }
            Monitor.Exit( m_LockAITrigger );

            return aiTrigger.Serial;
        }
Esempio n. 6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="nTriggerID"></param>
        public bool RemoveAITrigger( BaseAITrigger aiTrigger )
        {
            bool l_bReturn = false;

            Monitor.Enter( m_LockAITrigger );
            {
                l_bReturn = m_AITrigger.Remove( aiTrigger.AITriggerType, aiTrigger );
            }
            Monitor.Exit( m_LockAITrigger );

            return l_bReturn;
        }
Esempio n. 7
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public BaseAITrigger RegisterAITrigger( long iAIEventType, AIProcessPriority processPriority, TimeSpan expirationTimeSpan )
        {
            BaseAITrigger l_newBaseAITrigger = new BaseAITrigger( iAIEventType, processPriority, expirationTimeSpan );
            l_newBaseAITrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter( m_LockAITrigger );
            {
                m_AITrigger.Add( l_newBaseAITrigger.AITriggerType, l_newBaseAITrigger );
            }
            Monitor.Exit( m_LockAITrigger );

            return l_newBaseAITrigger;
        }
Esempio n. 8
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="iTriggerType"></param>
        /// <param name="processPriority"></param>
        /// <returns></returns>
        public BaseAITrigger RegisterAITrigger( long iAIEventType )
        {
            BaseAITrigger l_newBaseAITrigger = new BaseAITrigger( iAIEventType );
            l_newBaseAITrigger.InternalSerial = m_AITriggerExclusiveSerial.GetExclusiveSerial();

            Monitor.Enter( m_LockAITrigger );
            {
                m_AITrigger.Add( l_newBaseAITrigger.AITriggerType, l_newBaseAITrigger );
            }
            Monitor.Exit( m_LockAITrigger );

            return l_newBaseAITrigger;
        }