IL.Misc 2.0.0.1

dotnet add package IL.Misc --version 2.0.0.1
                    
NuGet\Install-Package IL.Misc -Version 2.0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IL.Misc" Version="2.0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IL.Misc" Version="2.0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="IL.Misc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IL.Misc --version 2.0.0.1
                    
#r "nuget: IL.Misc, 2.0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IL.Misc@2.0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IL.Misc&version=2.0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=IL.Misc&version=2.0.0.1
                    
Install as a Cake Tool

Misc & helpers

Supported frameworks

Targets .NET 10 and 11. The .NET 10 target uses Microsoft.Extensions.DependencyInjection.Abstractions 10.0.15 or later within major version 10. .NET 11 includes these abstractions in Microsoft.NETCore.App, so that target needs no separate package dependency.

Building both targets requires the .NET 11 SDK. Running the full test suite also requires the .NET 10 and 11 runtimes.

Concurrency - Lock Manager

Process-local keyed concurrency control built on SemaphoreSlim. A key and concurrency limit together identify a lock; different limits are intentionally independent. Availability is advisory, not a reservation. Idle entries are retired after approximately one minute by a shared cleanup timer; queued waiters and in-progress acquisitions prevent retirement.

Usage sample:

using (await LockManager.GetLockAsync("testKey"))
{
  //code inside is limited to single thread usage only
}
using (await LockManager.GetLockAsync("testKey", maxConcurrentCalls: 4))
{
  //code inside is limited to 4 threads, all other threads will be awaiting..
}

Also supports cancellationToken param.

Function LockManager.IsLockAvailable(string key) returns true if Lock has any available slots on semaphore or not created at all.

Ambient scopes

AmbientScopeService.CreateToken(IServiceScope) owns its scope. Enter a token with using (or await using for async-only scoped services). Default lease exit requests disposal and prevents reentry; cleanup runs exactly once after the final active lease exits. Reusable restores the previous ambient scope without requesting disposal. Token disposal while leases remain active is deferred and returns without waiting; the final lease determines sync versus async cleanup. Repeated disposal does not join pending asynchronous cleanup.

Dispose leases in reverse entry order in their originating logical flow. Each parallel user must enter independently: inherited ambient context does not extend scope lifetime. The IServiceProvider overload does not own the provider and cannot reliably distinguish root from scoped providers.

Reflection and wildcard helpers

Assembly filters support case-sensitive * and ?. References are filtered before loading, and unavailable references are skipped. Type discovery retains visible types after partial load failures; unexpected failures propagate instead of being hidden. Reflection discovery is annotated as unsafe for trimming; use explicit registration for trimmed/Native AOT applications.

Wildcard matching is allocation-free and ordinal over UTF-16 characters. Null inputs/patterns never match. Worst-case time is O(input length × pattern length), so bound untrusted input sizes.

Nuget

https://www.nuget.org/packages/IL.Misc/

Product Compatible and additional computed target framework versions.
.NET 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on IL.Misc:

Package Downloads
IL.AttributeBasedDI

Control dependencies and decorators via custom attributes - extends Microsoft.Extensions.DependencyInjection

IL.VirtualViews

Class based virtual views.

IL.InMemoryCacheProvider

Simple generic in memory cache provider.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0.1 202 11/16/2026
1.5.1.2 3,299 5/3/2026
1.5.1.1 307 4/21/2026
1.5.0.2 427 2/23/2026
1.5.0.1 1,788 1/5/2026
1.4.1 934 11/6/2025
1.4.0 1,027 10/30/2025
1.3.1 3,656 4/8/2025
1.3.0 756 2/26/2025
1.2.0 2,115 11/14/2024
1.1.1 3,452 7/9/2024
1.1.0 2,680 4/5/2024
1.0.5 291 4/5/2024
1.0.4 1,061 3/1/2024
1.0.3 340 2/13/2024
1.0.2 314 2/11/2024
1.0.1 386 10/31/2023
1.0.0 1,193 9/16/2023