JLib.Reflection 0.8.1

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

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

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 -

Improvements

  • Consolidate (Dsiable-) Automapper Pfofile Attributes
  • Improve JLib.Automapper Separation from JLib.Reflection - a lot of separation of concern issues are not addressed (i.E. the HasCustomAutoMapperProfile Property of TypeValueType)
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 (13)

Showing the top 5 NuGet packages that depend on JLib.Reflection:

Package Downloads
JLib.AutoMapper

Package Description

JLib.Configuration

Package Description

JLib.DependencyInjection

Package Description

JLib.DataProvider

Package Description

JLib.Reflection.HotChocolate.Query

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.8 497 10/18/2024
0.8.7 358 10/18/2024
0.8.6 307 10/17/2024
0.8.5 408 9/18/2024
0.8.4 351 9/18/2024
0.8.3 419 9/11/2024
0.8.1 481 9/2/2024
0.8.0 383 8/28/2024
0.7.6 400 8/27/2024
0.7.5 388 8/27/2024
0.7.4 391 8/27/2024
0.7.3 397 8/27/2024
0.7.1 379 7/24/2024
0.7.0 558 7/23/2024
0.6.2 651 4/10/2024
0.6.1 410 3/15/2024
0.6.0 393 3/15/2024
0.5.0 416 3/14/2024
0.4.5 425 3/13/2024
0.4.4 410 3/12/2024
0.4.3 471 3/12/2024
0.4.2 420 3/7/2024
0.4.1 406 3/7/2024
0.4.0 445 3/6/2024
0.3.0 448 2/29/2024
0.2.0 411 2/14/2024