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)); }
public ParseDataFromHtmlActor() { Receive <ParseDataFromHtmlMessage>(message => { var carParks = CarParkParser.ParseFromHtml(message.Html); Sender.Tell(carParks); }); }
public ParseDataFromHtmlActor() { var bestMatchActor = Context.ActorOf <BestMatchCarParkActor>(); Receive <ParseDataFromHtmlMessage>(message => { var carParks = CarParkParser.ParseFromHtml(message.Html); bestMatchActor.Tell(new BestMatchCarParkMessage(carParks)); }); }
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)); }