Piri.Extensions.DependencyInjection 1.0.7

Prefix Reserved
dotnet add package Piri.Extensions.DependencyInjection --version 1.0.7
                    
NuGet\Install-Package Piri.Extensions.DependencyInjection -Version 1.0.7
                    
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.7" />
                    
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.7" />
                    
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.7
                    
#r "nuget: Piri.Extensions.DependencyInjection, 1.0.7"
                    
#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.7
                    
#: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.7
                    
Install as a Cake Addin
#tool nuget:?package=Piri.Extensions.DependencyInjection&version=1.0.7
                    
Install as a Cake Tool

Piri.Extensions.DependencyInjection

Overview

Piri.Extensions.DependencyInjection is a .NET library that provides extensions for integrating the Piri Object Mapper with the .NET Dependency Injection framework. This package simplifies the configuration and usage of the Piri Object Mapper in your .NET applications.

Features

  • Seamless integration with .NET Dependency Injection
  • Easy configuration of Piri Object Mapper
  • Support for .NET 8

Installation

You can install the package via NuGet Package Manager or the .NET CLI.

NuGet Package Manager

Install-Package Piri.Extensions.DependencyInjection

.NET CLI

dotnet add package Piri.Extensions.DependencyInjection

Usage

To use the Piri Object Mapper with Dependency Injection, follow these steps:

  1. Configure Services: In your Program.cs or wherever you configure your services, add the Piri Object Mapper services.
    using Microsoft.Extensions.DependencyInjection;
    using Piri.Extensions.DependencyInjection;
    
    var builder = WebApplication.CreateBuilder(args);
    
    builder.Services.AddPiriMapper(options => {
        options.EnableDefaultMapping();
    });
    // Other service configurations
    var app = builder.Build();
    // Configure the HTTP request pipeline.
    await app.RunAsync();
    
  2. Inject and Use: Inject the IMapper interface into your classes and use it as needed.
    using Piri.Core;
    
    public class MyService {
        private readonly IMapper _mapper;
        public MyService(IMapper mapper)
        {
            _mapper = mapper;
        }
    
       public void MyMethod()
       {
           // Use the mapper
           var destination = _mapper.Map<DestinationType>(source);
       }
    }
    

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or feedback, please contact 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 115 11/8/2024
1.0.6 113 11/8/2024
1.0.5 103 11/8/2024
1.0.2 104 11/7/2024
1.0.1 97 11/7/2024
1.0.0 102 11/7/2024