Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 internal Connection(Signal signal, LuaAction action)
 {
     _signal = signal;
     _action = action;
 }