![]() |
VOOZH | about |
dotnet add package VaraniumSharp --version 6.2.0
NuGet\Install-Package VaraniumSharp -Version 6.2.0
<PackageReference Include="VaraniumSharp" Version="6.2.0" />
<PackageVersion Include="VaraniumSharp" Version="6.2.0" />Directory.Packages.props
<PackageReference Include="VaraniumSharp" />Project file
paket add VaraniumSharp --version 6.2.0
#r "nuget: VaraniumSharp, 6.2.0"
#:package VaraniumSharp@6.2.0
#addin nuget:?package=VaraniumSharp&version=6.2.0Install as a Cake Addin
#tool nuget:?package=VaraniumSharp&version=6.2.0Install as a Cake Tool
👁 Build status
👁 NuGet
👁 Coverage Status
👁 CodeFactor
VaraniumSharp is very simple helper library with the goal of having reusable, reliable components. It is written to not rely on any other libraries and as such can be easily dropped into any project to get access to the functionality it provides.
To leverage the dependency injection attributes provided by VaraniumSharp a package that wraps the DI framework is required.
Currently two such package are supported as part of the VaraniumSharp framework, one for DryIoC and one for the Microsoft ServiceCollection.
It is also easy to create a custom wrapper for your preffered provider by simply implementing the VaraniumSharp.DependencyInjection.AutomaticContainerRegistration class either directly in your project or as an additional library.
To see how to implement this interface please look at one of the existing packages.
Most of VaraniumSharp's functionality can be leveraged directly, however to make use of the DI attributes in your project there are a few steps.
Add an attribute to the class you want to add to the DI container. There are two main attributes with various properties, for more details see the documentation
// The attribute tells the DI system to create a registration fo the TabWindowContext for the interface ITabWindowContext
[AutomaticContainerRegistration(typeof(ITabWindowContext))]
public sealed class TabWindowContext : ITabWindowContext
Next, during application startup load the DLLs that contains injectable classes into the AppDomain, then create the container and request it to be set up.
After that you can simply resolve the main part of the application and execute it from the container.
// It is required to pre-load the assemblies that are auto-injected by VaraniumSharp otherwise their injections won't be picked up
AppDomain.CurrentDomain.Load(new AssemblyName("VaraniumSharp.WinUI"));
// Set up your IoC container and request that all classes are registered
var containerSetup = new ContainerSetup();
containerSetup.RetrieveClassesRequiringRegistration(true);
containerSetup.RetrieveConcretionClassesRequiringRegistration(true);
IPackageManager interface.For a detailed overview of the library see our documentation
With the release of VaraniumSharp 2.0.0 we are moving over to .NetStandard2.0 as this supports all .Net 4.6.1+ framework libraries and grants the ability to make use of DotNet Core2.0+ If an older version is required please file an issue and request support, we're willing to multi-target to older platforms where possible (Note that DotNet Core 1.x cannot be supported due to missing libraries)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on VaraniumSharp:
| Package | Downloads |
|---|---|
|
NeuroLinker
NeuroLinker is a scraping library for MyAnimeList. |
|
|
VaraniumSharp.Initiator
Ring 2 library based on VaraniumSharp. This library makes use of and extends VaraniumSharp to be a base for other (Ring 3) projects. |
|
|
VaraniumSharp.WinUI
A VarniumSharp library with WinUI helper classes and components. |
|
|
VaraniumSharp.Discord
VaraniumSharp.Discord is a VaraniumSharp add-on that wraps around Discord.Net for easy bot setup |
|
|
VaraniumSharp.Shenfield
WPF chassis build on VaraniumSharp.Initiator. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.0 | 674 | 11/17/2024 |
| 5.3.0 | 441 | 2/12/2024 |
| 5.2.0 | 3,376 | 12/12/2023 |
| 5.1.0 | 340 | 8/11/2023 |
| 5.0.2 | 568 | 11/29/2022 |
| 5.0.1 | 1,400 | 8/16/2022 |
| 4.2.1 | 2,301 | 12/17/2021 |
| 4.2.0 | 940 | 11/1/2021 |
| 4.1.0 | 579 | 9/29/2021 |
| 4.0.1 | 588 | 9/27/2021 |
| 4.0.0 | 644 | 9/27/2021 |
| 3.13.2 | 613 | 9/21/2021 |
| 3.12.0 | 681 | 9/10/2021 |
| 3.10.0 | 1,023 | 8/21/2021 |
| 3.9.3 | 906 | 8/21/2021 |