diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0007-WebHost-delegate-nullability.patch b/src/SourceBuild/tarball/patches/aspnetcore/0007-WebHost-delegate-nullability.patch index 426502e86..cf15d1bfc 100644 --- a/src/SourceBuild/tarball/patches/aspnetcore/0007-WebHost-delegate-nullability.patch +++ b/src/SourceBuild/tarball/patches/aspnetcore/0007-WebHost-delegate-nullability.patch @@ -24,14 +24,14 @@ index ca52bd1f40..643d03e8af 100644 // There's no way to to register multiple service types per definition. See https://github.com/aspnet/DependencyInjection/issues/360 -#pragma warning disable CS8634 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint. - _applicationServiceCollection.AddSingleton(services -- => services.GetService() as IHostApplicationLifetime); +- => services.GetService()! as IHostApplicationLifetime); + _applicationServiceCollection.AddSingleton(services + => services.GetService()!); #pragma warning disable CS0618 // Type or member is obsolete - _applicationServiceCollection.AddSingleton(services -- => services.GetService() as AspNetCore.Hosting.IApplicationLifetime); +- => services.GetService()! as AspNetCore.Hosting.IApplicationLifetime); - _applicationServiceCollection.AddSingleton(services -- => services.GetService() as Extensions.Hosting.IApplicationLifetime); +- => services.GetService()! as Extensions.Hosting.IApplicationLifetime); + _applicationServiceCollection.AddSingleton(services + => services.GetService()!); + _applicationServiceCollection.AddSingleton(services