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
<PackageReference Include="IL.Misc" Version="2.0.0.1" />
<PackageVersion Include="IL.Misc" Version="2.0.0.1" />
<PackageReference Include="IL.Misc" />
paket add IL.Misc --version 2.0.0.1
#r "nuget: IL.Misc, 2.0.0.1"
#:package IL.Misc@2.0.0.1
#addin nuget:?package=IL.Misc&version=2.0.0.1
#tool nuget:?package=IL.Misc&version=2.0.0.1
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
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15 && < 11.0.0)
-
net11.0
- No dependencies.
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 |