JLib.Reflection.DependencyInjection 0.4.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package JLib.Reflection.DependencyInjection --version 0.4.0                
NuGet\Install-Package JLib.Reflection.DependencyInjection -Version 0.4.0                
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="JLib.Reflection.DependencyInjection" Version="0.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JLib.Reflection.DependencyInjection --version 0.4.0                
#r "nuget: JLib.Reflection.DependencyInjection, 0.4.0"                
#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 JLib.Reflection.DependencyInjection as a Cake Addin
#addin nuget:?package=JLib.Reflection.DependencyInjection&version=0.4.0

// Install JLib.Reflection.DependencyInjection as a Cake Tool
#tool nuget:?package=JLib.Reflection.DependencyInjection&version=0.4.0                

Jlib.Reflection

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Features

  • compile time Typesafety: a function may opnly accept EntityTypes instead of all types
  • improved Readabillity through communication of content: you do not get a Type but an EntityType or and DtoType
  • reduced Validation: you do not have to check if the type is valid each time you want to use it
  • navigation properties: a TypeValueType might contain References to other TypevalueTypes, such as EntityType.MappedDataTransferObject
  • utility methods: you are able to create methods to simplify the usage, for example to automatically add type arguments to the type
  • start-time validation: on startup, each valuetype can be validated and the solution won't run if an type is invalid, for example missing a required interface
  • reflection-caching: All reflections are executed once and use from that point the calculated result.
  • simplified type discovery: you can use the TvtFactoryAttributes to automatically discover all your types
  • DRY-er code: you define your reflections at one central location per TypeValueType, which prevents you from having to write the same code multiple times
  • simplified reflection: you no longer have to think about what defines an entity when trying to build something like a AutoMapper.Profile using reflection, since it has already been done.

Components

  • TypeValueType
    • Combines the DDD ValueObjects / Value Types with the System.Type
    • see: Jlib.Reflection.TypeValueType
    • MUST NOT be instantiated manually but by using the TypeCache
    • MUST be decorated using FactoryAttributes
    • Types MUST only be assignable to a single TypeValueType according to the TypeValueTypes FactoryAttributes
  • FactoryAttributes
    • provides a simplified way to define which types are, for example, Entities simply by adding attributes.
    • see: JLib.Reflection.TvtFactoryAttributes
    • MUST implement JLib.Reflection.TvtFactoryAttributes.ITypeValueTypeFilterAttribute
    • MUST only be used on classes derived from TypeValueType
  • TypeCache
    • Created when the application starts. Handles the Initialization and delivery of TypeValueTypes
    • see: TypeCache, JLib.ServiceCollectionHelper.AddTypeCache
    • SHOULD: be used as singleton
  • TypePackages -
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 is compatible.  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 is compatible.  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 JLib.Reflection.DependencyInjection:

Package Downloads
JLib

Metapackage for all JLIb packages

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.8 236 10/18/2024
0.8.7 148 10/18/2024
0.8.6 93 10/17/2024
0.8.5 153 9/18/2024
0.8.4 110 9/18/2024
0.8.3 130 9/11/2024
0.8.1 207 9/2/2024
0.8.0 115 8/28/2024
0.7.6 113 8/27/2024
0.7.5 107 8/27/2024
0.7.4 107 8/27/2024
0.7.3 107 8/27/2024
0.7.1 202 7/24/2024
0.7.0 125 7/23/2024
0.6.2 163 4/10/2024
0.6.1 154 3/15/2024
0.6.0 134 3/15/2024
0.5.0 134 3/14/2024
0.4.5 121 3/13/2024
0.4.4 137 3/12/2024
0.4.3 117 3/12/2024
0.4.2 148 3/7/2024
0.4.1 141 3/7/2024
0.4.0 158 3/6/2024
0.3.0 126 2/29/2024
0.2.0 143 2/14/2024