DisposableHelpers 1.2.88
dotnet add package DisposableHelpers --version 1.2.88
NuGet\Install-Package DisposableHelpers -Version 1.2.88
<PackageReference Include="DisposableHelpers" Version="1.2.88" />
paket add DisposableHelpers --version 1.2.88
#r "nuget: DisposableHelpers, 1.2.88"
// Install DisposableHelpers as a Cake Addin #addin nuget:?package=DisposableHelpers&version=1.2.88 // Install DisposableHelpers as a Cake Tool #tool nuget:?package=DisposableHelpers&version=1.2.88
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. |
.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 (>= 9.0.1)
-
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.88 | 94 | 1/16/2025 |
1.2.86 | 337 | 1/10/2025 |
1.2.84 | 131 | 1/8/2025 |
1.2.83 | 285 | 12/31/2024 |
1.2.82 | 199 | 12/27/2024 |
1.2.81 | 187 | 12/26/2024 |
1.2.80 | 247 | 12/18/2024 |
1.2.79 | 214 | 12/17/2024 |
1.2.78 | 266 | 12/6/2024 |
1.2.77 | 287 | 12/5/2024 |
1.2.76 | 206 | 12/5/2024 |
1.2.75 | 175 | 12/3/2024 |
1.2.74 | 115 | 12/3/2024 |
1.2.73 | 195 | 12/3/2024 |
1.2.71 | 119 | 12/3/2024 |
1.2.70 | 231 | 11/25/2024 |
1.2.69 | 103 | 11/25/2024 |
1.2.68 | 104 | 11/22/2024 |
1.2.67 | 131 | 11/22/2024 |
1.2.64 | 305 | 11/20/2024 |
1.2.63 | 54 | 11/19/2024 |
1.2.62 | 228 | 11/14/2024 |
1.2.60 | 171 | 11/13/2024 |
1.2.59 | 199 | 11/12/2024 |
1.2.58 | 189 | 11/8/2024 |
1.2.57 | 45 | 11/8/2024 |
1.2.56 | 46 | 11/8/2024 |
1.2.55 | 45 | 11/8/2024 |
1.2.54 | 51 | 11/7/2024 |
1.2.53 | 182 | 11/6/2024 |
1.2.52 | 45 | 11/6/2024 |
1.2.51 | 174 | 11/5/2024 |
1.2.50 | 288 | 10/30/2024 |
1.2.49 | 147 | 10/30/2024 |
1.2.48 | 175 | 10/29/2024 |
1.2.47 | 257 | 10/28/2024 |
1.2.46 | 62 | 10/25/2024 |
1.2.45 | 329 | 10/23/2024 |
1.2.44 | 235 | 10/22/2024 |
1.2.43 | 322 | 10/17/2024 |
1.2.42 | 327 | 10/14/2024 |
1.2.41 | 271 | 10/11/2024 |
1.2.40 | 504 | 10/7/2024 |
1.2.39 | 278 | 10/4/2024 |
1.2.38 | 258 | 10/2/2024 |
1.2.37 | 261 | 9/27/2024 |
1.2.36 | 49 | 9/27/2024 |
1.2.35 | 65 | 9/27/2024 |
1.2.34 | 353 | 9/25/2024 |
1.2.33 | 146 | 9/25/2024 |
1.2.32 | 248 | 9/23/2024 |
1.2.31 | 55 | 9/23/2024 |
1.2.30 | 247 | 9/20/2024 |
1.2.29 | 127 | 9/20/2024 |
1.2.28 | 280 | 9/18/2024 |
1.2.27 | 161 | 9/16/2024 |
1.2.26 | 290 | 9/10/2024 |
1.2.24 | 359 | 9/5/2024 |
1.2.23 | 370 | 8/29/2024 |
1.2.22 | 266 | 8/26/2024 |
1.2.21 | 232 | 8/22/2024 |
1.2.20 | 60 | 8/22/2024 |
1.2.19 | 58 | 8/22/2024 |
1.2.18 | 169 | 8/20/2024 |
1.2.17 | 367 | 8/14/2024 |
1.2.16 | 153 | 8/13/2024 |
1.2.15 | 392 | 7/31/2024 |
1.2.14 | 73 | 7/31/2024 |
1.2.13 | 129 | 7/26/2024 |
1.2.12 | 483 | 7/16/2024 |
1.2.11 | 107 | 7/15/2024 |
1.2.10 | 97 | 7/13/2024 |
1.2.9 | 115 | 7/12/2024 |
1.2.8 | 137 | 7/9/2024 |
1.2.7 | 120 | 7/8/2024 |
1.2.6 | 55 | 7/8/2024 |
1.2.5 | 59 | 7/8/2024 |
1.2.4 | 147 | 7/7/2024 |
1.2.3 | 211 | 7/1/2024 |
1.2.2 | 105 | 6/30/2024 |
1.2.1 | 118 | 6/28/2024 |
1.2.0 | 204 | 5/3/2024 |
1.1.16 | 1,382 | 10/3/2023 |
1.1.15 | 319 | 8/30/2023 |
1.1.14 | 254 | 8/28/2023 |
1.1.13 | 282 | 8/8/2023 |
1.1.12 | 276 | 7/11/2023 |
1.1.11 | 166 | 7/9/2023 |
1.1.10 | 242 | 6/20/2023 |
1.1.9 | 1,756 | 9/8/2022 |
1.1.8 | 396 | 9/4/2022 |
1.1.7 | 409 | 9/4/2022 |
1.1.6 | 2,694 | 7/20/2022 |
1.1.5 | 431 | 7/20/2022 |
1.1.4 | 462 | 7/17/2022 |
1.1.3 | 407 | 7/17/2022 |
1.1.2 | 471 | 7/17/2022 |
1.1.1 | 431 | 7/17/2022 |
1.1.0 | 475 | 7/17/2022 |
1.0.2 | 4,100 | 3/7/2022 |
1.0.1 | 3,292 | 2/21/2022 |
1.0.0 | 1,206 | 2/17/2022 |
## New Version
* Bump `disposable_helpers` from `1.2.86` to `1.2.88`. See [changelog](https://github.com/Kiryuumaru/DisposableHelpers/compare/disposable_helpers/1.2.86...disposable_helpers/1.2.88)
## What's Changed
* Bump Microsoft.Bcl.AsyncInterfaces from 9.0.0 to 9.0.1 by @dependabot in https://github.com/Kiryuumaru/DisposableHelpers/pull/136
* Bump Nuke.Common from 9.0.3 to 9.0.4 by @dependabot in https://github.com/Kiryuumaru/DisposableHelpers/pull/138
**Full Changelog**: https://github.com/Kiryuumaru/DisposableHelpers/compare/build.94...build.96