Initialize 0.0.1-alpha

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

// Install Initialize as a Cake Tool
#tool nuget:?package=Initialize&version=0.0.1-alpha&prerelease                

Overview

alternate text is missing from this package README image NuGet version (Initializer-Alpha)

High performance automatic DTO mapper and properties initializer based on Roslyn dynamic code and compilation

Example Usage

	var test = new Test();
	var test2 = new Test2();

	// INITIALIZER EXAMPLE
	test.Dump("Test Pre Init");

	// 1.Optional If you want to manipuate the default initialization logic.
	Initializer<Test>.Template.Clear();

	Initializer<Test>.Template.Add(typeof(string),
		(obj, propInfo) => "string.Empty");
	Initializer<Test>.Template.Add(typeof(Nullable<>),
		(obj, propInfo) => string.Format("{0}.{1}!.InitValueOrDefault()", obj, propInfo.Name));
	Initializer<Test>.Template.Add(typeof(ValueType),
		(obj, propInfo) => string.Format("{0}.{1}.InitValueOrDefault()", obj, propInfo.Name));
		
	// 2. Call initialize 
	Initializer<Test>.Initialize(test);
	test.Dump("Test Post Init");
	

	//MAPPER EXAMPLE
	test2.Dump("Test2 Pre Map");
	Mapper<Test, Test2>.Map(test, test2);
	test2.Dump("Test2 Post Map");

Feedback, Suggestions and Contributions

Are all welcome!

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 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.2 362 11/28/2023
0.2.8 311 2/17/2023
0.2.7 255 2/17/2023
0.2.6 252 2/16/2023
0.2.4 246 2/16/2023
0.2.3 252 2/15/2023
0.2.2 258 2/15/2023
0.2.1 273 2/15/2023
0.0.2-alpha 151 2/14/2023
0.0.1-alpha 149 2/14/2023