Skip to content

Instantly share code, notes, and snippets.

@trbngr
Created June 3, 2015 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trbngr/6377162238bda85bd8c4 to your computer and use it in GitHub Desktop.
Save trbngr/6377162238bda85bd8c4 to your computer and use it in GitHub Desktop.
public class TechnologyScraper : ReceiveActor
{
private readonly ILoggingAdapter _logger;
public TechnologyScraper(ITechnologyService service)
{
_logger = Context.GetLogger();
Receive<ScrapeTechnologies>(x =>
{
_logger.Debug("Starting tech scrape");
service.Scrape(Self);
});
Receive<TechnologyScrapeResult>(x =>
{
_logger.Info("{0:000} active technologies", x.ActiveTechnologies.Length);
_logger.Info("{0:000} inactive technologies", x.InactiveTechnologies.Length);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment