Piri.Extensions.DependencyInjection 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Piri.Extensions.DependencyInjection --version 1.0.0
                    
NuGet\Install-Package Piri.Extensions.DependencyInjection -Version 1.0.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="Piri.Extensions.DependencyInjection" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Piri.Extensions.DependencyInjection" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Piri.Extensions.DependencyInjection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Piri.Extensions.DependencyInjection --version 1.0.0
                    
#r "nuget: Piri.Extensions.DependencyInjection, 1.0.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.
#:package Piri.Extensions.DependencyInjection@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Piri.Extensions.DependencyInjection&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Piri.Extensions.DependencyInjection&version=1.0.0
                    
Install as a Cake Tool

Piri

Simple object mapper for C#

Overview

Piri is a lightweight and easy-to-use object mapper for C#. It allows you to map objects of one type to another with minimal configuration. This can be particularly useful when working with data transfer objects (DTOs) and domain models.

  • Simple and intuitive API
  • High performance
  • Supports complex mappings
  • Customizable mappings
  • Fluent configuration

Installation

You can install Piri via NuGet Package Manager. Run the following command in the Package Manager Console:

Install-Package Piri

Getting Started

Let's say you have the following source and destination classes:

public class Source
{
	public int Id { get; set; }
	public string Name { get; set; }
}

public class Destination
{
	public int Id { get; set; }
	public string FullName { get; set; }
}

You can map a Source object to a Destination object like this:

using Piri.Core

public class Program
{
	public static void Main()
	{
		IMapper mapper = PiriMapper.Create(options => {
			options.AddMap<Source, Destination>(source => new Destination {
				Id = source.Id,
				FullName = source.Name
			});
		});
		var source = new Source { Id = 1, Name = "John Doe" };
		var destination = mapper.Map<Destination>(source);

		Console.WriteLine($"Id: {destination.Id}, FullName: {destination.FullName}");
	}
}

Documentation

For more detailed documentation and advanced usage, please refer to the official documentation.

Contributing

We welcome contributions to Piri. If you would like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

License

Piri is licensed under the MIT License. See the LICENSE file for more information.

Contact

If you have any questions or feedback, feel free to reach out to us at me@gturkmen.com.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
1.0.7 120 11/8/2024
1.0.6 116 11/8/2024
1.0.5 107 11/8/2024
1.0.2 107 11/7/2024
1.0.1 100 11/7/2024
1.0.0 105 11/7/2024