public override async Task <ParseDataFromHtmlCommand> HandleAsync(ParseDataFromHtmlCommand command, CancellationToken cancellationToken = new CancellationToken())
        {
            var carParks = CarParkParser.ParseFromHtml(command.Html);

            command.CarParks = carParks;
            return(await base.HandleAsync(command, cancellationToken));
        }
Exemplo n.º 2
0
 public ParseDataFromHtmlActor()
 {
     Receive <ParseDataFromHtmlMessage>(message =>
     {
         var carParks = CarParkParser.ParseFromHtml(message.Html);
         Sender.Tell(carParks);
     });
 }
Exemplo n.º 3
0
        public ParseDataFromHtmlActor()
        {
            var bestMatchActor = Context.ActorOf <BestMatchCarParkActor>();

            Receive <ParseDataFromHtmlMessage>(message =>
            {
                var carParks = CarParkParser.ParseFromHtml(message.Html);
                bestMatchActor.Tell(new BestMatchCarParkMessage(carParks));
            });
        }
Exemplo n.º 4
0
        public async Task <IEnumerable <CarPark> > Handle(ParseDataFromHtmlQuery query)
        {
            var carParks = CarParkParser.ParseFromHtml(query.Html);

            return(await Task.FromResult(carParks));
        }
        protected override Task <IEnumerable <CarPark> > HandleCore(ParseDataFromHtmlRequest request)
        {
            var carParks = CarParkParser.ParseFromHtml(request.Html);

            return(Task.FromResult(carParks));
        }