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                
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="AgileCoding.Library.Types" Version="2.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AgileCoding.Library.Types --version 2.0.5                
#r "nuget: AgileCoding.Library.Types, 2.0.5"                
#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.
// 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

  1. Install the NuGet package into your project.

bashCopy code

Install-Package AgileCoding.Library.Types -Version 2.0.5

  1. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last updated
2.0.5 196 8/3/2023
1.0.0.2 444 6/28/2021
1.0.0.1 353 6/2/2021

Moving to core