JLib.Reflection 0.6.2

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package JLib.Reflection --version 0.6.2
NuGet\Install-Package JLib.Reflection -Version 0.6.2
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.6.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JLib.Reflection --version 0.6.2
#r "nuget: JLib.Reflection, 0.6.2"
#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.6.2

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

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 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

JLib.Configuration The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

JLib.DependencyInjection The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

JLib.DataProvider The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

JLib.DataGeneration The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.2 316 4/10/2024
0.6.1 288 3/15/2024
0.6.0 266 3/15/2024
0.5.0 277 3/14/2024
0.4.5 285 3/13/2024
0.4.4 273 3/12/2024
0.4.3 335 3/12/2024
0.4.2 272 3/7/2024
0.4.1 274 3/7/2024
0.4.0 299 3/6/2024
0.3.0 284 2/29/2024
0.2.0 287 2/14/2024