aspnetcore/test
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
..
Microsoft.AspNetCore.Certificates.Configuration.Tests
Microsoft.AspNetCore.Hosting.FunctionalTests
Microsoft.AspNetCore.Hosting.Tests Detect duplicate startups in HostingStartupAssemblies (#1183) 2017-09-18 11:47:34 -07:00
Microsoft.AspNetCore.Hosting.WebHostBuilderFactory.Tests
Microsoft.AspNetCore.TestHost.Tests
Microsoft.Extensions.Hosting.Tests Add BackgroundService, a base class for long running HostedServices (#1215) 2017-09-18 12:55:54 -07:00
TestAssets
Directory.Build.props