/// <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); }
internal Connection(Signal signal, LuaAction action) { _signal = signal; _action = action; }