public DownloadActor(IAsyncBackgroundCaller asyncBackgroundCaller) { _asyncBackgroundCaller = asyncBackgroundCaller; Receive <DownloadMessage>(d => { var sender = Sender; _asyncBackgroundCaller.Call(d.BaseAddress, d.RelativePath).PipeTo(sender, Self, _ => _.Length > 0 ? d.BaseAddress + " ok" : d.BaseAddress + " fail", ex => null); }); }
public HomeController(IAsyncBackgroundCaller asyncBackgroundCaller, ActorSystem actorSystem) { _asyncBackgroundCaller = asyncBackgroundCaller; _actorSystem = actorSystem; }