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)); }
public Task Route(RouteMessage routeMessage) { _pipelineBlock.Post(routeMessage); return(Task.CompletedTask); }
public void Write(TelemetryMessage message) { message.Verify(nameof(message)).IsNotNull(); _pipeline.Post(message); }