{"id":13629579,"url":"https://github.com/myblindy/FastAutoMapper","last_synced_at":"2025-04-17T09:34:51.721Z","repository":{"id":47543442,"uuid":"399527848","full_name":"myblindy/FastAutoMapper","owner":"myblindy","description":"The aim of this project is to provide compile-time support for auto-mapping by using source generation.","archived":false,"fork":false,"pushed_at":"2022-07-21T17:19:58.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-01T22:43:56.962Z","etag":null,"topics":["automapper","efficiency","source-generation"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myblindy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-24T16:06:06.000Z","updated_at":"2022-07-21T16:39:41.000Z","dependencies_parsed_at":"2022-08-12T13:40:46.704Z","dependency_job_id":null,"html_url":"https://github.com/myblindy/FastAutoMapper","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myblindy%2FFastAutoMapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myblindy%2FFastAutoMapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myblindy%2FFastAutoMapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myblindy%2FFastAutoMapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myblindy","download_url":"https://codeload.github.com/myblindy/FastAutoMapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751246,"owners_count":17196593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automapper","efficiency","source-generation"],"created_at":"2024-08-01T22:01:14.094Z","updated_at":"2024-11-08T20:31:17.506Z","avatar_url":"https://github.com/myblindy.png","language":"C#","readme":"[![publish to nuget](https://github.com/myblindy/FastAutoMapper/actions/workflows/nuget.yml/badge.svg)](https://github.com/myblindy/FastAutoMapper/actions/workflows/nuget.yml)\n[![NuGet](http://img.shields.io/nuget/v/MB.FastAutoMapper.svg)](https://www.nuget.org/packages/MB.FastAutoMapper/) [![NuGet Downloads](http://img.shields.io/nuget/dt/MB.FastAutoMapper.svg)](https://www.nuget.org/packages/MB.FastAutoMapper/)\n\n# MB.FastAutoMapper\n\nThe aim of this project is to provide compile-time support for auto-mapping by using source generation. The ubiquitous AutoMapper instead builds the mapping code at run-time.\n\nOne of the benefits of this approach, besides paying the mapping cost at compile-time instead of run-time everytime, is that any mapping errors are also caught at compile time due to the strict type-safety of C#. \n\nThe code is pretty simple to use, simply reference the NuGet package `MB.FastAutoMapper` and write something like this:\n\n```C#\nusing FastAutoMapper;\n\nclass Src\n{\n  public string Text { get; set; }\n  public float[] Color { get; set; }\n}\n\nclass Dst\n{\n  public string Text { get; set; }\n  public Vector3 Color { get; set; }\n}\n\n// first declare the mapper class, make sure it is a partial type\npartial class Mapper : FastAutoMapperBase { }\n\n// then declare your instance\nvar mapper = new Mapper();\n\n// define the maps you need, including any conversions with `ForMember`\nmapper.CreateMap\u003cFrom, To\u003e()\n  .ForMember(x =\u003e x.Color, x =\u003e new Vector3(x.Color[0], x.Color[1], x.Color[2]));\n  \n// and map your instances\nvar dst = mapper.Map(new Src { Text = \"meep\", Color = new[] { .1f, .5f, 1f } });\n```\n","funding_links":[],"categories":["Do not want to test 112 ( old ISourceGenerator )"],"sub_categories":["1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyblindy%2FFastAutoMapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyblindy%2FFastAutoMapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyblindy%2FFastAutoMapper/lists"}