diff --git a/azure-pipeline-PR.yml b/azure-pipeline-PR.yml index 3eb0f86..5dbedd4 100644 --- a/azure-pipeline-PR.yml +++ b/azure-pipeline-PR.yml @@ -17,7 +17,7 @@ steps: displayName: 'Use .NET 8.0 sdk' inputs: packageType: sdk - version: 8.0.300 + version: 8.0.401 installationPath: $(Agent.ToolsDirectory)/dotnet - script: echo Started restoring the source code - task: DotNetCoreCLI@2 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a8c0629..5d8f349 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ steps: displayName: 'Use .NET 8.0 sdk' inputs: packageType: sdk - version: 8.0.302 + version: 8.0.401 installationPath: $(Agent.ToolsDirectory)/dotnet - script: echo Started restoring the source code - task: DotNetCoreCLI@2 diff --git a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj index d32f398..e5acaa3 100644 --- a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj +++ b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj @@ -11,7 +11,7 @@ - + all @@ -21,7 +21,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/src/Abstracts/TestBedFixture.cs b/src/Abstracts/TestBedFixture.cs index 09080e8..d687a70 100644 --- a/src/Abstracts/TestBedFixture.cs +++ b/src/Abstracts/TestBedFixture.cs @@ -4,7 +4,7 @@ namespace Xunit.Microsoft.DependencyInjection.Abstracts; public abstract class TestBedFixture : IDisposable, IAsyncDisposable { - private readonly IServiceCollection _services; + private readonly ServiceCollection _services; private ServiceProvider? _serviceProvider; private bool _disposedValue; private bool _disposedAsync; @@ -79,6 +79,7 @@ public async ValueTask DisposeAsync() Dispose(); _disposedAsync = true; } + GC.SuppressFinalize(this); } protected abstract void AddServices(IServiceCollection services, IConfiguration? configuration); diff --git a/src/Logging/OutputLoggerProvider.cs b/src/Logging/OutputLoggerProvider.cs index 6a02b0e..6c62124 100644 --- a/src/Logging/OutputLoggerProvider.cs +++ b/src/Logging/OutputLoggerProvider.cs @@ -7,7 +7,5 @@ public class OutputLoggerProvider(ITestOutputHelper testOutputHelper) : ILoggerP public ILogger CreateLogger(string categoryName) => new OutputLogger(categoryName, _testOutputHelper); - public void Dispose() - { - } + public void Dispose() => GC.SuppressFinalize(this); }