Skip to content

racccoooon/labyrinth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labyrinth

This is a cute package for raccoons to map objects.

Usage/Examples

var mapper = new Mapper();
mapper.Configure<TargetType, SourceType>(mapping =>
{
    mapping.AutoMap(s => s.Data);
    mapping.MapProperty(s => s.Id);
    mapping.MapProperty(s => s.Num + 1, t => t.Number);
});

var result = mapper.Map<TargetType, SourceType>(new()
{
    Id = 123,
    Number = 68,
    Data = new()
    {
        Content = "foobar"
    }
});

// result == TargetType {Id = 123, Number = 69, Content = "foobar"}

Authors

a bunch of raccoons

License

MIT

Releases

No releases published

Packages

No packages published

Languages