Commit Graph

14 Commits

Author SHA1 Message Date
Chris Ross (ASP.NET) 2c1376c95f Add a AddHostedService extension #1402 2018-05-01 14:07:24 -07:00
Chris Ross (ASP.NET) 05d1a6eb0e Refactor Generic Host lifetimes to work better with ServiceBase #1347 2018-03-23 12:02:44 -07:00
Ryan Brandenburg 1bac12716d Updating baselines 2018-03-21 15:32:09 -07:00
Nate McMaster c5f2333481 Pin tool and package versions to make build more repeatable 2017-10-31 13:04:32 -07:00
Javier Calvarro Nelson 6687f4eefc Update API check baselines to 2.0 2017-09-22 17:52:20 -07:00
Chris Ross 253be73b6f Misc generic host pr feedback (#1222) 2017-09-21 15:09:52 -07:00
David Fowler 712c992ca8 Add BackgroundService, a base class for long running HostedServices (#1215)
* Add BackgroundService, a base class for long running HostedServices
- Today the IHostedService pattern is a StartAsync/StopAsync pattern. Neither of these
methods are supposed to return a long running task that represents an execution. If
you wanted to have some logic run on a timer every 5 minutes, it's unnatural to do so
with simple async idioms. This base class implements IHostedService and exposes
a pattern where a long running async Task can be returned.
- The token passed into ExecuteAsync represents the lifetime of the execution.
- StartAsync and StopAsync were made virtual to allow the derived type to
indicate Start failures.
- Added tests
2017-09-18 12:55:54 -07:00
Chris Ross (ASP.NET) ae9da9290e #1163 Implement the generic host 2017-09-14 14:48:06 -07:00
Nate McMaster 9a4a43cc6a Use Directory.Build.props/targets 2017-08-29 09:52:04 -07:00
John Luo 3b488c470a Make IHostedServiceAsync 2017-05-26 10:52:08 -07:00
John Luo 62cd07d0a6 Target NETStandard2.0 and add WindowsServices back 2017-05-19 14:17:02 -07:00
John Luo 906af6de30 Update API check exceptions 2017-05-12 11:57:41 -07:00
John Luo 9b80f2a635 Migration 2017-05-05 17:12:36 -07:00
Chris R 285d62b312 Move IHostedService to new Microsoft.Extensions.Hosting.Abstractions package. 2017-04-26 14:06:11 -07:00