Interface IHost
- Namespace
- Microsoft.Extensions.Hosting
- Assembly
- nanoFramework.Hosting.dll
A program abstraction.
public interface IHost : IDisposable
- Inherited Members
- Extension Methods
Properties
Services
Gets the services configured for the program (for example, using ConfigureServices(ServiceContextDelegate)).
IServiceProvider Services { get; }
Property Value
Methods
StartAsync(CancellationToken)
Starts the IHostedService objects configured for the program.
void StartAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to abort program start.
StopAsync(CancellationToken)
Attempts to gracefully stop the program.
void StopAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to indicate when stop should no longer be graceful.