Esempio n. 1
0
        public StreamRouter(IOption option)
        {
            _option = option;

            _createBlockChainRoute = new PipelineBlock <RouteMessage>()
                                     .DoAction(x => CreateBlockChainRoute(x));

            _pipelineBlock = new PipelineBlock <RouteMessage>()
                             .Register(_createBlockChainRoute)
                             .Broadcast()
                             .DoAction(x => _createBlockChainRoute.Post(x));
        }
Esempio n. 2
0
 public Task Route(RouteMessage routeMessage)
 {
     _pipelineBlock.Post(routeMessage);
     return(Task.CompletedTask);
 }
Esempio n. 3
0
        public void Write(TelemetryMessage message)
        {
            message.Verify(nameof(message)).IsNotNull();

            _pipeline.Post(message);
        }