JustArchiNET.Madness
0.3.0
Due to the fact that we've dropped support for .NET Framework in our other projects, we don't intend to develop Madness further. You're free to fork or re-use Madness components if you find them useful!
See the version list below for details.
dotnet add package JustArchiNET.Madness --version 0.3.0
NuGet\Install-Package JustArchiNET.Madness -Version 0.3.0
<PackageReference Include="JustArchiNET.Madness" Version="0.3.0" />
paket add JustArchiNET.Madness --version 0.3.0
#r "nuget: JustArchiNET.Madness, 0.3.0"
// Install JustArchiNET.Madness as a Cake Addin #addin nuget:?package=JustArchiNET.Madness&version=0.3.0 // Install JustArchiNET.Madness as a Cake Tool #tool nuget:?package=JustArchiNET.Madness&version=0.3.0
☠️ Madness
Madness embraces your project by including compatibility layer for selected APIs normally not available on .NET Framework target.
WORK IN PROGRESS NOTE
A lot of stuff is still work-in-progress, please bear with me while I'm adding documentation, CIs and everything else.
How to use it
Add nuget package to .NET Framework project of your choice. We support netstandard2.0
, so .NET Framework 4.6.1 and newer.
Afterwards, in all files where you require assistance, include the reference:
#if NETFRAMEWORK
using JustArchiNET.Madness;
#endif
Voila, madness has embraced your project.
#if NETFRAMEWORK
using JustArchiNET.Madness;
#endif
using System.IO;
using System.Threading.Tasks;
namespace ThisIsMadness {
public static class ThisIsSparta {
public static async Task Scream() {
MemoryStream stream = new MemoryStream();
// Wow, this compiles now, but .NET Framework can't into `IAsyncDisposable`!
// HOW IS THIS POSSIBLE, THIS IS MADNESS ☠️
await stream.DisposeAsync().ConfigureAwait(false);
}
}
}
FAQ
Do I need that #if NETFRAMEWORK
clause?
If you're building only for .NET Framework exclusively, no, it's not required and actually useless for you.
However, if you're targetting multiple frameworks out of which only one is .NET Framework (e.g. net5.0
and net48
), then #if
clause guarantees that madness won't embrace your other targets.
You don't want madness to embrace your other targets, do you?
Including madness embraced stuff I didn't want to, like File
or Path
, what to do?
If you don't require madness in those aspects, tell C# compiler to use built-in classes in those places.
using File = System.IO.File;
And what if I do?
using File = JustArchiNET.Madness.File;
And if I need to combine both?
Sometimes, in particular when you refer only to selected methods and properties, you can simply point to Madness
for .NET Framework, and built-in classes for the rest.
#if NETFRAMEWORK
using JustArchiNET.Madness;
#else
using File = System.IO.File;
#endif
public static async Task Example() {
// This will nicely use Madness for .NET Framework and System.IO.File for other targets, nice!
await File.WriteAllTextAsync("example.txt", "example").ConfigureAwait(false);
}
And sometimes you can't, just #if
all the way through for those cases, still better than writing it yourself, right?
public static void Example() {
#if NETFRAMEWORK
if (!StaticHelpers.IsRunningOnMono) {
ServicePointManager.ReusePort = true;
}
#else
ServicePointManager.ReusePort = true;
#endif
}
You can in theory call Madness
parts exclusively (since it's based on .NET Standard, not Framework per-se), so the above is rather a "perfect" example for not affecting your other targets negatively. If you don't mind, you can call madness on both, but chances are you don't want to pollute your runtime performance more than necessary. Choose your poison.
All of this is cool, but I'm missing XYZ
for my needs...
Send a PR, Madness
by default includes parts that I require myself in ArchiSteamFarm project and as you can guess, one-man army like me can't rewrite what thousands of developers did in .NET just to satisfy .NET Framework on its last leg. For best results include exact classes, methods, properties and everything else, so source code requirements to make use of it are close to minimum and hopefully only using
clause will be required to embrace the Madness
!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.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 was computed. |
.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
- IndexRange (>= 1.0.0)
- Microsoft.AspNetCore.Hosting.Abstractions (>= 1.0.0)
- Microsoft.Bcl.AsyncInterfaces (>= 1.0.0)
- System.Memory (>= 4.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JustArchiNET.Madness:
Package | Downloads |
---|---|
ArchiSteamFarm.Library
ASF is a C# application with primary purpose of idling Steam cards from multiple accounts simultaneously. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.17.0 | 1,543 | 10/21/2023 | |
3.16.0 | 2,613 | 9/13/2023 | |
3.15.0 | 4,756 | 5/24/2023 | |
3.14.0 | 347 | 5/17/2023 | |
3.13.0 | 285 | 5/16/2023 | |
3.12.0 | 866 | 4/20/2023 | |
3.11.0 | 3,163 | 2/9/2023 | |
3.10.0 | 1,231 | 1/12/2023 | |
3.9.0 | 3,394 | 12/15/2022 | |
3.8.0 | 4,162 | 10/27/2022 | |
3.7.0 | 11,650 | 7/2/2022 | |
3.6.0 | 2,901 | 6/19/2022 | |
3.5.2 | 5,373 | 4/22/2022 | |
3.5.1 | 1,260 | 4/13/2022 | |
3.5.0 | 457 | 4/13/2022 | |
3.4.0 | 904 | 4/2/2022 | |
3.3.0 | 4,189 | 2/18/2022 | |
3.2.1 | 5,146 | 1/23/2022 | |
3.2.0 | 477 | 1/22/2022 | |
3.1.1 | 3,850 | 12/12/2021 | |
3.1.0 | 313 | 12/12/2021 | |
3.0.0 | 3,069 | 12/4/2021 | |
2.4.1 | 1,301 | 11/29/2021 | |
2.4.0 | 1,256 | 11/29/2021 | |
2.3.2 | 1,159 | 11/19/2021 | |
2.3.1 | 747 | 11/19/2021 | |
2.3.0 | 774 | 11/19/2021 | |
2.2.1 | 427 | 11/18/2021 | |
2.2.0 | 349 | 11/18/2021 | |
2.1.0 | 419 | 11/17/2021 | |
2.0.0 | 478 | 11/13/2021 | |
2.0.0-alpha5 | 266 | 11/11/2021 | |
2.0.0-alpha4 | 282 | 11/11/2021 | |
2.0.0-alpha3 | 275 | 11/11/2021 | |
2.0.0-alpha2 | 428 | 11/8/2021 | |
2.0.0-alpha1 | 266 | 11/8/2021 | |
1.5.0 | 910 | 11/8/2021 | |
1.4.0 | 1,231 | 10/22/2021 | |
1.3.1 | 1,939 | 9/5/2021 | |
1.3.0 | 6,328 | 8/23/2021 | |
1.2.0 | 526 | 8/19/2021 | |
1.1.0 | 819 | 8/9/2021 | |
1.0.0 | 480 | 8/7/2021 | |
0.3.0 | 503 | 8/7/2021 | |
0.2.0 | 426 | 8/5/2021 | |
0.1.0 | 512 | 8/5/2021 |