Пример #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));
        }
Пример #2
0
 public Task Route(RouteMessage routeMessage)
 {
     _pipelineBlock.Post(routeMessage);
     return(Task.CompletedTask);
 }
Пример #3
0
        public void Write(TelemetryMessage message)
        {
            message.Verify(nameof(message)).IsNotNull();

            _pipeline.Post(message);
        }