Esempio n. 1
0
        public void TestOffEvent()
        {
            var             connector = new TcpConnector("127.0.0.1", 7777);
            Action <object> call      = (ex) =>
            {
                Assert.Fail();
            };

            connector.On(SocketEvents.Error, call);
            connector.On(SocketEvents.Error, call);

            connector.On(SocketEvents.Error, (ex) =>
            {
            });

            connector.Off(SocketEvents.Error, call);
            connector.Trigger(SocketEvents.Error, new Exception());
        }