micro-elements - MicroElements.AutoMapper.NodaTime 1.0.0

NodaTime support for AutoMapper.

PM> Install-Package MicroElements.AutoMapper.NodaTime -Version 1.0.0 -Source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard

> nuget.exe install MicroElements.AutoMapper.NodaTime -Version 1.0.0 -Source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard

> dotnet add package MicroElements.AutoMapper.NodaTime --version 1.0.0 --source https://www.myget.org/F/micro-elements/api/v3/index.json

Copy to clipboard
<PackageReference Include="MicroElements.AutoMapper.NodaTime" Version="1.0.0" />
Copy to clipboard
source https://www.myget.org/F/micro-elements/api/v3/index.json

nuget MicroElements.AutoMapper.NodaTime  ~> 1.0.0
Copy to clipboard

> choco install MicroElements.AutoMapper.NodaTime --version 1.0.0 --source https://www.myget.org/F/micro-elements/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "micro-elements" -SourceLocation "https://www.myget.org/F/micro-elements/api/v2"
Install-Module -Name "MicroElements.AutoMapper.NodaTime" -RequiredVersion "1.0.0" -Repository "micro-elements" 
Copy to clipboard

MicroElements.AutoMapper.NodaTime

Allows to use NodaTime with AutoMapper.

Statuses

License NuGetVersion NuGetDownloads MyGetVersion

Build Travis Coverage Status Gitter

Installation

Package Reference:

dotnet add package MicroElements.AutoMapper.NodaTime

Usage

var mapper = new Mapper(
    new MapperConfiguration(cfg =>
    {
        // Adds NodaTime converters to AutoMapper.
        cfg.AddProfile<NodaTimeProfile>();
    }));

var localDateTime = new LocalDateTime(2020, 03, 26, 23, 34, 45);
var dateTime = mapper.Map<LocalDateTime, DateTime>(localDateTime);

Build

Linux: Run build.sh

License

This project is licensed under the MIT license. See the LICENSE file for more info.

$# 1.0.0

  • Support conversions:
    • LocalDate -> DateTime
    • DateTime -> LocalDate
    • LocalDateTime -> DateTime
    • DateTime -> LocalDateTime
    • LocalTime -> TimeSpan
    • TimeSpan -> LocalTime
    • LocalTime -> DateTime
    • DateTime -> LocalTime
    • Instant -> DateTime
    • DateTime -> Instant
    • Instant -> DateTimeOffset
    • DateTimeOffset -> Instant
    • Nullable variants for each conversion

Full release notes can be found at: https://github.com/micro-elements/MicroElements.AutoMapper.NodaTime.git/blob/master/CHANGELOG.md

  • .NETStandard 2.0
    • AutoMapper (>= 9.0.0)
    • NodaTime (>= 3.0.0)
  • .NETStandard 2.0: 2.0.0.0

Owners

Alexey Petryashev

Authors

micro-elements

Project URL

https://github.com/micro-elements/MicroElements.AutoMapper.NodaTime.git

License

Unknown

Tags

AutoMapper NodaTime MicroElements

Info

8 total downloads
8 downloads for version 1.0.0
Download (12.37 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.0.0 12.37 KB Fri, 26 Mar 2021 20:47:56 GMT 8