示例#1
0
        /// <summary>
        /// Connects the given listener to the signal.
        /// </summary>
        public Connection connect(LuaAction listener)
        {
            if (listener == null)
            {
                throw new ArgumentNullException(nameof(listener), "Listener function was null.");
            }

            var connection = new Connection(this, listener);

            lock (Locker)
            {
                Connections.Add(connection);
            }
            return(connection);
        }
示例#2
0
 internal Connection(Signal signal, LuaAction action)
 {
     _signal = signal;
     _action = action;
 }