AgileCoding.Library.Types
2.0.5
dotnet add package AgileCoding.Library.Types --version 2.0.5
NuGet\Install-Package AgileCoding.Library.Types -Version 2.0.5
<PackageReference Include="AgileCoding.Library.Types" Version="2.0.5" />
paket add AgileCoding.Library.Types --version 2.0.5
#r "nuget: AgileCoding.Library.Types, 2.0.5"
// Install AgileCoding.Library.Types as a Cake Addin #addin nuget:?package=AgileCoding.Library.Types&version=2.0.5 // Install AgileCoding.Library.Types as a Cake Tool #tool nuget:?package=AgileCoding.Library.Types&version=2.0.5
AgileCoding.Library.Types
Introduction
The AgileCoding.Library.Types is a .NET 6.0 package that provides utilities to handle types and reflections in a more comprehensive manner. This library is authored by Ernie Gunning. It is available as a NuGet package version 2.0.5.
This library provides classes such as DictionaryOfInstances
, DictionaryOfTypes
, and DynamicLibrary
. These classes can generate dictionaries containing instances or types based on certain conditions and dynamically retrieve interface types. These utilities can be beneficial for complex applications dealing with dynamic types and requiring flexible handling of types and instances.
Getting Started
- Install the NuGet package into your project.
bashCopy code
Install-Package AgileCoding.Library.Types -Version 2.0.5
- Add the following using directive in your class file:
csharpCopy code
using AgileCoding.Library.Types;
Key Features
Create a dictionary of instances that implements interfaces with certain properties. This can be useful for dynamic dependency injection or instance retrieval based on certain conditions.
Generate a dictionary containing types based on enum properties on the interface. This can be beneficial in scenarios where types are associated with specific enums.
Retrieve interface types dynamically from the currently loaded assemblies.
Sample Usage
Creating Dictionary of Instances
Dictionary<MyEnum, IMyInterface> myDictionary = DictionaryOfInstances.CreateDictionaryOfInstancesThatImplementsEnumInterfaces<MyEnum, IMyInterface>(...parameters);
Getting Interface Types Dynamically
List<Type> myTypes = DynamicLibrary.GetInterfaceTypes<IMyInterface>();
Documentation
For detailed information about the usage and API references, please visit the Wiki.
Source Code
You can find the source code of the library on GitHub.
License
Please see the LICENSE
file distributed with this package. By installing and using this package, you agree to the terms and conditions of this license.
Contributions and Issues
Contributions are welcome. Please submit a pull request on GitHub. If you encounter any issues or have questions, please post them on the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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. |
-
net6.0
- AgileCoding.Extentions.Activator (>= 2.0.5)
- AgileCoding.Library.Interfaces (>= 2.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AgileCoding.Library.Types:
Package | Downloads |
---|---|
AgileCoding.Factory.ClientProxy
Factories that create service proxies |
GitHub repositories
This package is not used by any popular GitHub repositories.
Moving to core