DisposableHelpers 1.2.151
dotnet add package DisposableHelpers --version 1.2.151
NuGet\Install-Package DisposableHelpers -Version 1.2.151
<PackageReference Include="DisposableHelpers" Version="1.2.151" />
<PackageVersion Include="DisposableHelpers" Version="1.2.151" />
<PackageReference Include="DisposableHelpers" />
paket add DisposableHelpers --version 1.2.151
#r "nuget: DisposableHelpers, 1.2.151"
#:package DisposableHelpers@1.2.151
#addin nuget:?package=DisposableHelpers&version=1.2.151
#tool nuget:?package=DisposableHelpers&version=1.2.151
DisposableHelpers
Disposable helpers for IDisposable and IAsyncDisposable with source generators. Also capable of both anonymous disposable and anonymous async disposable.
NuGets
| Name | Info |
|---|---|
| DisposableHelpers |
Installation
// Install release version
Install-Package DisposableHelpers
// Install pre-release version
Install-Package DisposableHelpers -pre
Supported frameworks
.NET Standard 2.0 and above - see https://github.com/dotnet/standard/blob/master/docs/versions.md for compatibility matrix
Usage
Disposable
using DisposableHelpers;
namespace YourNamespace
{
public class SampleDisposable : Disposable
{
private SampleUnmanagedResource resources;
protected override void Dispose(bool disposing)
{
if (disposing)
{
resources.Release();
}
base.Dispose(disposing);
}
}
}
Disposable Source Generator
using DisposableHelpers.Attributes;
namespace YourNamespace
{
[Disposable]
public partial class SampleDisposable
{
private SampleUnmanagedResource resources;
protected void Dispose(bool disposing)
{
if (disposing)
{
resources.Release();
}
base.Dispose(disposing);
}
}
}
Anonymous Disposable
using DisposableHelpers;
namespace YourNamespace
{
public static class Program
{
private static SampleUnmanagedResource resources;
public static void Main(string[] args)
{
Disposable disposable = new Disposable(disposing =>
{
if (disposing)
{
resources.Release();
}
});
disposable.Dispose();
}
}
}
AsyncDisposable
using DisposableHelpers;
namespace YourNamespace
{
public class SampleAsyncDisposable : AsyncDisposable
{
private SampleAsyncUnmanagedResource resources;
protected override async ValueTask Dispose(bool isDisposing)
{
if (isDisposing)
{
await resources.Release();
}
return base.Dispose(isDisposing);
}
}
}
AsyncDisposable Source Generator
using DisposableHelpers.Attributes;
namespace YourNamespace
{
[AsyncDisposable]
public partial class SampleAsyncDisposable
{
private SampleAsyncUnmanagedResource resources;
protected async ValueTask Dispose(bool isDisposing)
{
if (isDisposing)
{
await resources.Release();
}
return base.Dispose(isDisposing);
}
}
}
Anonymous AsyncDisposable
using DisposableHelpers;
namespace YourNamespace
{
public static class Program
{
private static SampleAsyncUnmanagedResource resources;
public static async void Main(string[] args)
{
AsyncDisposable disposable = new AsyncDisposable(async disposing =>
{
if (disposing)
{
await resources.Release();
}
});
await disposable.DisposeAsync();
}
}
}
Want To Support This Project?
All I have ever asked is to be active by submitting bugs, features, and sending those pull requests down!.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.1)
-
net10.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on DisposableHelpers:
| Package | Downloads |
|---|---|
|
SingletonSessionHelpers
Provides a base API for singleton session design pattern. |
|
|
LockerHelpers
Provides helpers for execution locking mechanism. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.151 | 999 | 12/10/2025 |
| 1.2.150 | 4,274 | 12/2/2025 |
| 1.2.149 | 117 | 12/1/2025 |
| 1.2.148 | 84 | 11/28/2025 |
| 1.2.147 | 262 | 11/28/2025 |
| 1.2.146 | 74 | 11/27/2025 |
| 1.2.145 | 348 | 11/25/2025 |
| 1.2.144 | 207 | 11/25/2025 |
| 1.2.143 | 90 | 11/25/2025 |
| 1.2.142 | 269 | 11/11/2025 |
| 1.2.141 | 95 | 11/11/2025 |
| 1.2.140 | 7,052 | 11/6/2025 |
| 1.2.139 | 89 | 11/6/2025 |
| 1.2.138 | 732 | 11/4/2025 |
| 1.2.137 | 104 | 11/4/2025 |
| 1.2.136 | 742 | 11/2/2025 |
| 1.2.135 | 3,262 | 10/14/2025 |
| 1.2.134 | 123 | 10/9/2025 |
| 1.2.133 | 106 | 10/9/2025 |
| 1.2.132 | 142 | 9/30/2025 |
| 1.2.131 | 140 | 9/29/2025 |
| 1.2.130 | 159 | 9/23/2025 |
| 1.2.129 | 155 | 9/9/2025 |
| 1.2.128 | 10,133 | 9/5/2025 |
| 1.2.127 | 1,947 | 8/20/2025 |
| 1.2.126 | 132 | 8/19/2025 |
| 1.2.125 | 3,321 | 8/9/2025 |
| 1.2.124 | 118 | 8/7/2025 |
| 1.2.123 | 179 | 8/6/2025 |
| 1.2.121 | 114 | 8/5/2025 |
| 1.2.120 | 93 | 7/29/2025 |
| 1.2.119 | 763 | 7/29/2025 |
| 1.2.118 | 80 | 7/29/2025 |
| 1.2.117 | 77 | 7/29/2025 |
| 1.2.116 | 89 | 7/29/2025 |
| 1.2.115 | 159 | 7/17/2025 |
| 1.2.113 | 583 | 7/10/2025 |
| 1.2.112 | 116 | 7/8/2025 |
| 1.2.111 | 811 | 6/10/2025 |
| 1.2.110 | 173 | 6/10/2025 |
| 1.2.109 | 167 | 6/4/2025 |
| 1.2.108 | 171 | 5/27/2025 |
| 1.2.107 | 1,166 | 5/14/2025 |
| 1.2.106 | 173 | 5/13/2025 |
| 1.2.105 | 243 | 5/5/2025 |
| 1.2.104 | 141 | 5/5/2025 |
| 1.2.102 | 1,715 | 4/8/2025 |
| 1.2.101 | 382 | 3/25/2025 |
| 1.2.99 | 270 | 3/24/2025 |
| 1.2.98 | 280 | 3/17/2025 |
| 1.2.97 | 318 | 3/12/2025 |
| 1.2.93 | 655 | 2/20/2025 |
| 1.2.92 | 313 | 2/20/2025 |
| 1.2.90 | 567 | 1/27/2025 |
| 1.2.89 | 370 | 1/20/2025 |
| 1.2.88 | 325 | 1/16/2025 |
| 1.2.86 | 492 | 1/10/2025 |
| 1.2.84 | 314 | 1/8/2025 |
| 1.2.83 | 451 | 12/31/2024 |
| 1.2.82 | 341 | 12/27/2024 |
| 1.2.81 | 340 | 12/26/2024 |
| 1.2.80 | 408 | 12/18/2024 |
| 1.2.79 | 357 | 12/17/2024 |
| 1.2.78 | 390 | 12/6/2024 |
| 1.2.77 | 458 | 12/5/2024 |
| 1.2.76 | 351 | 12/5/2024 |
| 1.2.75 | 325 | 12/3/2024 |
| 1.2.74 | 238 | 12/3/2024 |
| 1.2.73 | 341 | 12/3/2024 |
| 1.2.71 | 258 | 12/3/2024 |
| 1.2.70 | 389 | 11/25/2024 |
| 1.2.69 | 256 | 11/25/2024 |
| 1.2.68 | 232 | 11/22/2024 |
| 1.2.67 | 274 | 11/22/2024 |
| 1.2.64 | 453 | 11/20/2024 |
| 1.2.63 | 210 | 11/19/2024 |
| 1.2.62 | 373 | 11/14/2024 |
| 1.2.60 | 316 | 11/13/2024 |
| 1.2.59 | 345 | 11/12/2024 |
| 1.2.58 | 326 | 11/8/2024 |
| 1.2.57 | 210 | 11/8/2024 |
| 1.2.56 | 173 | 11/8/2024 |
| 1.2.55 | 186 | 11/8/2024 |
| 1.2.54 | 197 | 11/7/2024 |
| 1.2.53 | 323 | 11/6/2024 |
| 1.2.52 | 173 | 11/6/2024 |
| 1.2.51 | 313 | 11/5/2024 |
| 1.2.50 | 411 | 10/30/2024 |
| 1.2.49 | 289 | 10/30/2024 |
| 1.2.48 | 323 | 10/29/2024 |
| 1.2.47 | 406 | 10/28/2024 |
| 1.2.46 | 216 | 10/25/2024 |
| 1.2.45 | 454 | 10/23/2024 |
| 1.2.44 | 363 | 10/22/2024 |
| 1.2.43 | 463 | 10/17/2024 |
| 1.2.42 | 487 | 10/14/2024 |
| 1.2.41 | 426 | 10/11/2024 |
| 1.2.40 | 629 | 10/7/2024 |
| 1.2.39 | 426 | 10/4/2024 |
| 1.2.38 | 396 | 10/2/2024 |
| 1.2.37 | 407 | 9/27/2024 |
| 1.2.36 | 187 | 9/27/2024 |
| 1.2.35 | 212 | 9/27/2024 |
| 1.2.34 | 496 | 9/25/2024 |
| 1.2.33 | 290 | 9/25/2024 |
| 1.2.32 | 393 | 9/23/2024 |
| 1.2.31 | 200 | 9/23/2024 |
| 1.2.30 | 396 | 9/20/2024 |
| 1.2.29 | 267 | 9/20/2024 |
| 1.2.28 | 419 | 9/18/2024 |
| 1.2.27 | 305 | 9/16/2024 |
| 1.2.26 | 434 | 9/10/2024 |
| 1.2.24 | 486 | 9/5/2024 |
| 1.2.23 | 497 | 8/29/2024 |
| 1.2.22 | 405 | 8/26/2024 |
| 1.2.21 | 364 | 8/22/2024 |
| 1.2.20 | 210 | 8/22/2024 |
| 1.2.19 | 201 | 8/22/2024 |
| 1.2.18 | 318 | 8/20/2024 |
| 1.2.17 | 505 | 8/14/2024 |
| 1.2.16 | 294 | 8/13/2024 |
| 1.2.15 | 534 | 7/31/2024 |
| 1.2.14 | 223 | 7/31/2024 |
| 1.2.13 | 278 | 7/26/2024 |
| 1.2.12 | 626 | 7/16/2024 |
| 1.2.11 | 250 | 7/15/2024 |
| 1.2.10 | 224 | 7/13/2024 |
| 1.2.9 | 259 | 7/12/2024 |
| 1.2.8 | 281 | 7/9/2024 |
| 1.2.7 | 263 | 7/8/2024 |
| 1.2.6 | 210 | 7/8/2024 |
| 1.2.5 | 199 | 7/8/2024 |
| 1.2.4 | 272 | 7/7/2024 |
| 1.2.3 | 362 | 7/1/2024 |
| 1.2.2 | 222 | 6/30/2024 |
| 1.2.1 | 263 | 6/28/2024 |
| 1.2.0 | 350 | 5/3/2024 |
| 1.1.16 | 1,529 | 10/3/2023 |
| 1.1.15 | 441 | 8/30/2023 |
| 1.1.14 | 382 | 8/28/2023 |
| 1.1.13 | 433 | 8/8/2023 |
| 1.1.12 | 410 | 7/11/2023 |
| 1.1.11 | 276 | 7/9/2023 |
| 1.1.10 | 374 | 6/20/2023 |
| 1.1.9 | 2,037 | 9/8/2022 |
| 1.1.8 | 541 | 9/4/2022 |
| 1.1.7 | 524 | 9/4/2022 |
| 1.1.6 | 2,982 | 7/20/2022 |
| 1.1.5 | 588 | 7/20/2022 |
| 1.1.4 | 602 | 7/17/2022 |
| 1.1.3 | 561 | 7/17/2022 |
| 1.1.2 | 593 | 7/17/2022 |
| 1.1.1 | 595 | 7/17/2022 |
| 1.1.0 | 624 | 7/17/2022 |
| 1.0.2 | 5,069 | 3/7/2022 |
| 1.0.1 | 3,674 | 2/21/2022 |
| 1.0.0 | 1,417 | 2/17/2022 |
## New Version
* Bump `disposable_helpers` from `1.2.150` to `1.2.151`. See [changelog](https://github.com/Kiryuumaru/DisposableHelpers/compare/disposable_helpers/1.2.150...disposable_helpers/1.2.151)
## What's Changed
* Bump Microsoft.Bcl.AsyncInterfaces from 10.0.0 to 10.0.1 by @dependabot[bot] in https://github.com/Kiryuumaru/DisposableHelpers/pull/210
**Full Changelog**: https://github.com/Kiryuumaru/DisposableHelpers/compare/build.20251202192321.d5ee320...build.20251210191217.b186052