Esempio n. 1
0
        public override Task StartInternalAsync()
        {
            var end = new TaskCompletionSource <bool>();

            _cancellationRegistration = Token.Register(() =>
            {
                end.TrySetCanceled();
            });

            var incommingLink = new IncomingLinkEndpoint(end, _messages);

            var uri = new Uri("amqp://localhost:" + Settings.Port);

            _host = new ContainerHost(uri);

            _host.Open();

            _host.RegisterMessageProcessor(uri.AbsolutePath, new MessageProcessor());
            _host.RegisterLinkProcessor(new LinkProcessor(incommingLink));

            return(end.Task);
        }
Esempio n. 2
0
 public LinkProcessor(IncomingLinkEndpoint incommingLink)
 {
     _incommingLink = incommingLink;
 }