コード例 #1
0
ファイル: NetMQMonitorTests.cs プロジェクト: ewin66/Pigeon
        public void Setup()
        {
            poller         = mockPoller.Object;
            sender         = mockSender.Object;
            receiver       = mockReceiver.Object;
            publisher      = mockPublisher.Object;
            subscriber     = mockSubscriber.Object;
            pollableSocket = mockPollableSocket.Object;

            mockSender
            .SetupGet(m => m.PollableSocket)
            .Returns(pollableSocket);

            mockReceiver
            .SetupGet(m => m.PollableSocket)
            .Returns(pollableSocket);

            mockPublisher
            .SetupGet(m => m.PollableSocket)
            .Returns(pollableSocket);

            mockSubscriber
            .SetupGet(m => m.PollableSocket)
            .Returns(pollableSocket);
        }
コード例 #2
0
 /// <summary>
 /// Adds a <see cref="INetMQSender"/> to the internal cache of monitored <see cref="ISender"/>s
 /// </summary>
 /// <param name="sender"><see cref="INetMQSender"/> to add to the monitored cache of <see cref="ISender"/>s</param>
 public void AddSender(INetMQSender sender) => Add(sender, senders, s => s.InitializeConnection());