Example #1
0
 public DtoChannelTest()
 {
     _pipedTwoChannels = new PipedTwoChannels();
     _typeSerializers  = new TypeSerializers();
     _first            = new DtoChannel(_pipedTwoChannels.First, _typeSerializers);
     _second           = new DtoChannel(_pipedTwoChannels.Second, _typeSerializers);
 }
Example #2
0
        public DtoChannelTest()
        {
            _pipedTwoChannels = new PipedTwoChannels();
            var options = new TypeSerializersOptions {
                IgnoreIIndirect = false
            };

            _first  = new DtoChannel(_pipedTwoChannels.First, new TypeSerializers(options: options));
            _second = new DtoChannel(_pipedTwoChannels.Second, new TypeSerializers(options: options));
        }
Example #3
0
            public void Run()
            {
                _twoChannels = new PipedTwoChannels();
                _twoChannels.Second.OnReceive.Subscribe(_twoChannels.Second.Send);
                const int messageLen = 1024;
                var       sender     = new Sender(messageLen, MessageCount, _twoChannels.First);
                var       receiver   = new Receiver(messageLen, MessageCount);

                receiver.StartReceive(_twoChannels.First);
                sender.MassSend();
                receiver.WaitTillFinish();
                Console.WriteLine(sender.SummaryInfo("PipeEcho send"));
                Console.WriteLine(receiver.SummaryInfo("PipeEcho recv"));
                _twoChannels.Disconnect();
            }
Example #4
0
 public ConnectedServiceTest()
 {
     _pipedTwoChannels = new PipedTwoChannels();
     _first            = new Service(_pipedTwoChannels.First);
     _second           = new Service(_pipedTwoChannels.Second);
 }