From 8aab15d13c5e98e9d96e61f1589fc8dadbe8e3bd Mon Sep 17 00:00:00 2001 From: Timothy Makkison Date: Sun, 22 Oct 2023 11:13:01 +0100 Subject: [PATCH] chore: modify docs --- docs/docs/configuration/private-member-mapping.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/docs/configuration/private-member-mapping.md b/docs/docs/configuration/private-member-mapping.md index 9331584ff7..2551c611d8 100644 --- a/docs/docs/configuration/private-member-mapping.md +++ b/docs/docs/configuration/private-member-mapping.md @@ -5,13 +5,9 @@ description: Private member mapping # Private member mapping -Mention generating a static class of helper methods using this technique +As of .NET 8.0, Mapperly supports mapping members that are normally inaccessible like `private` or `protected` properties. This is made possible by using the [UnsafeAccessorAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.unsafeaccessorattribute) which lets Mapperly access normally inaccessible members with zero overhead while being completely AOT safe. -As of .Net 8.0, Mapperly supports mapping members that are normally inaccessible like `private` or `protected` properties. This is made possible by using the [UnsafeAccessorAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.unsafeaccessorattribute) which lets Mapperly access normally inaccessible members with zero overhead while being completely AOT safe. - -By default `IncludedMembers` is set to `MemberVisibility.AllAccessible` which will configure Mapperly to map member of all accessibility levels as long as they are ordinarily accessible. To enable unsafe accessor usage, set `IncludedMembers` to `MemberVisibility.All`. Mapperly will then try to map members of all accessibilities, including ones that are not usually visible. - -See example below +By default `IncludedMembers` is set to `MemberVisibility.AllAccessible` which will configure Mapperly to map members of all accessibility levels as long as they are ordinarily accessible. To enable unsafe accessor usage, set `IncludedMembers` to `MemberVisibility.All`. Mapperly will then try to map members of all accessibilities, including ones that are not usually visible to external types. ```csharp public class Fruit