Пример #1
0
            public void Start(IMessageBus <FakeService.IMessage> messageBus)
            {
                _unsubscribe = messageBus.Subscribe(message =>
                {
                    switch (message)
                    {
                    case FakeService.DoWorkA workA:
                        _fakeService.HandleWorkA(workA);
                        break;

                    case FakeService.DoWorkB workB:
                        FakeService.HandleWorkB(workB);
                        break;
                    }
                });
            }