Beispiel #1
0
        public Auctioneer(Fiber fiber, Scheduler scheduler, ActorRepository <Seller, string> sellerRepository)
        {
            _fiber            = fiber;
            _sellerRepository = sellerRepository;

            _registerSeller = new DefaultMailbox <RegisterSeller>(fiber, scheduler);

            _input = new ChannelAdapter();

            _subscriptions = _input.Connect(x =>
            {
                x.Consume <RegisterSeller>()
                .Using(message => _registerSeller.Send(message));
            });

            _registerSeller.Receive(OnRegisterSeller);
        }