File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/Hosting/WindowsServices/test Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ public async Task StopBeforeServiceStarted()
2222#pragma warning disable ASPDEPR004 // Type or member is obsolete
2323 var host = new WebHostBuilder ( ) . UseServer ( new FakeServer ( ) ) . Configure ( x => { } ) . Build ( ) ;
2424#pragma warning restore ASPDEPR004 // Type or member is obsolete
25+ #pragma warning disable CS0618 // Type or member is obsolete
2526 var webHostService = new WebHostService ( host ) ;
27+ #pragma warning restore CS0618 // Type or member is obsolete
2628 var applicationLifetime = host . Services . GetRequiredService < IHostApplicationLifetime > ( ) ;
2729
2830 applicationLifetime . StopApplication ( ) ;
@@ -38,7 +40,9 @@ public async Task StopAfterServiceStarted()
3840#pragma warning disable ASPDEPR004 // Type or member is obsolete
3941 var host = new WebHostBuilder ( ) . UseServer ( new FakeServer ( ) ) . Configure ( x => { } ) . Build ( ) ;
4042#pragma warning restore ASPDEPR004 // Type or member is obsolete
43+ #pragma warning disable CS0618 // Type or member is obsolete
4144 var webHostService = new WebHostService ( host ) ;
45+ #pragma warning restore CS0618 // Type or member is obsolete
4246 var applicationLifetime = host . Services . GetRequiredService < IHostApplicationLifetime > ( ) ;
4347
4448 webHostService . Start ( ) ;
You can’t perform that action at this time.
0 commit comments