示例#1
0
        //
        /// <summary>
        /// Called by an execution listener who has previously added themselves via TryAddExecutionListenerToShutDownList
        /// to the list of listenrs who would like the session to persist until they are able to shutdown nicely.
        /// By calling this method, they are now signalling they are done and no longer needed a TTAPI session.
        /// </summary>
        /// <param name="execListener"></param>
        /// <returns></returns>
        public bool TryRemoveExecutionListenerFromShutDownList(Execution.ExecutionListenerTT execListener)
        {
            int i;

            return(m_ExecutionListenersAwaitingShutdown.TryRemove(execListener, out i));
        }
示例#2
0
        }// InitAPI()

        //
        //
        /// <summary>
        /// Called by an execution listener who would like the session to persist until he has completed
        /// his own shutdown procedures.  He must call TryRemoveExecutionListenerFromShutDownList when he is ready
        /// to allow shutdown to occur.
        /// </summary>
        /// <param name="execListener"></param>
        /// <returns></returns>
        public bool TryAddExecutionListenerToShutDownList(Execution.ExecutionListenerTT execListener)
        {
            return(m_ExecutionListenersAwaitingShutdown.TryAdd(execListener, 0)); // all have value of zero to start.
        }