Skip to content

Commit

Permalink
Dispose was simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
litichevskiydv committed Aug 7, 2024
1 parent 670dcb1 commit 723f451
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/Abstractions/ServiceImplementations/ServiceImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,10 @@ public class ServiceImplementation : IDisposable
/// </summary>
public IServiceProvider ServiceProvider { get; set; }

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (ubuntu-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (macos-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (macos-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (ubuntu-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (windows-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 19 in src/Abstractions/ServiceImplementations/ServiceImplementation.cs

View workflow job for this annotation

GitHub Actions / push (windows-latest)

Non-nullable property 'ServiceProvider' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

protected virtual void Dispose(bool disposing)
{
if (disposing)
{
if(ServiceProvider is IDisposable disposable)
disposable.Dispose();
}
}

public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
if (ServiceProvider is IDisposable disposable)
disposable.Dispose();
}
}
}

0 comments on commit 723f451

Please sign in to comment.