TryDisposable NuGet Package

Wrap an object in a disposable decorator to attempt to dispose the object later.

This is useful when retrieving an instance of an object from a factory or container while only having an interface reference. If the interface does not implement IDisposable or IAsyncDisposable, but the concrete class does, this will allow you to dispose the instance without the need to check for the interface and cast it.




Got any TryDisposable Question?





Info

Version: 8.0.1
Author(s): Daniel M. Porrey
Last Update: Wednesday, September 11, 2024
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/porrey/TryDisposable
NuGet Url: https://www.nuget.org/packages/TryDisposable


Install
Install-Package TryDisposable
dotnet add package TryDisposable
paket add TryDisposable
TryDisposable Download (Unzip the "nupkg" after downloading)

.NETFramework 4.5
  • No dependencies.
.NETStandard 1.3 .NETStandard 2.0
  • No dependencies.
net461
  • No dependencies.
net5.0
  • No dependencies.
netcoreapp3.1
  • No dependencies.
netstandard2.1
  • No dependencies.
4 packages depend on this package.


Tags



STATS

must-have-score

2.3

avg-downloads-per-day

17

days-since-last-release

55