@@ -14,39 +14,48 @@ namespace BlazorDesktop.Services;
1414/// <summary>
1515/// The blazor desktop service.
1616/// </summary>
17- /// <remarks>
18- /// Creates a <see cref="BlazorDesktopService"/> instance.
19- /// </remarks>
20- /// <param name="lifetime">The <see cref="IHostApplicationLifetime"/>.</param>
21- /// <param name="services">The <see cref="IServiceProvider"/>.</param>
22- /// <param name="logger">The <see cref="ILogger{TCategoryName}"/>.</param>
23- /// <param name="webViewInstaller">The <see cref="WebViewInstaller"/>.</param>
24- public partial class BlazorDesktopService ( IHostApplicationLifetime lifetime , IServiceProvider services , ILogger < BlazorDesktopService > logger , WebViewInstaller webViewInstaller ) : IHostedService , IDisposable
17+ public partial class BlazorDesktopService : IHostedService , IDisposable
2518{
19+ /// <summary>
20+ /// The cancellation token registration.
21+ /// </summary>
22+ private CancellationTokenRegistration _applicationStoppingRegistration ;
23+
2624 /// <summary>
2725 /// The application lifetime.
2826 /// </summary>
29- private readonly IHostApplicationLifetime _lifetime = lifetime ;
27+ private readonly IHostApplicationLifetime _lifetime ;
3028
3129 /// <summary>
3230 /// The services.
3331 /// </summary>
34- private readonly IServiceProvider _services = services ;
32+ private readonly IServiceProvider _services ;
3533
3634 /// <summary>
3735 /// The <see cref="ILogger{TCategoryName}"/>.
3836 /// </summary>
39- private readonly ILogger < BlazorDesktopService > _logger = logger ;
37+ private readonly ILogger < BlazorDesktopService > _logger ;
4038
4139 /// <summary>
4240 /// The web view installer.
4341 /// </summary>
44- private readonly WebViewInstaller _webViewInstaller = webViewInstaller ;
42+ private readonly WebViewInstaller _webViewInstaller ;
4543
4644 /// <summary>
47- /// The cancellation token registration .
45+ /// Creates a <see cref="BlazorDesktopService"/> instance .
4846 /// </summary>
49- private CancellationTokenRegistration _applicationStoppingRegistration ;
47+ /// <param name="lifetime">The <see cref="IHostApplicationLifetime"/>.</param>
48+ /// <param name="services">The <see cref="IServiceProvider"/>.</param>
49+ /// <param name="logger">The <see cref="ILogger{TCategoryName}"/>.</param>
50+ /// <param name="webViewInstaller">The <see cref="WebViewInstaller"/>.</param>
51+ public BlazorDesktopService ( IHostApplicationLifetime lifetime , IServiceProvider services , ILogger < BlazorDesktopService > logger , WebViewInstaller webViewInstaller )
52+ {
53+ _applicationStoppingRegistration = new ( ) ;
54+ _lifetime = lifetime ;
55+ _services = services ;
56+ _logger = logger ;
57+ _webViewInstaller = webViewInstaller ;
58+ }
5059
5160 /// <summary>
5261 /// Starts the service.
0 commit comments