Skip to content

Commit

Permalink
docs: remove generic UseStaticMapper example as it only works with no…
Browse files Browse the repository at this point in the history
…n-static classes
  • Loading branch information
latonz committed Oct 29, 2023
1 parent 3eb1598 commit 82a2e9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/docs/configuration/user-implemented-methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ For static mappings, `UseStaticMapper` can be used:
```csharp
[Mapper]
// highlight-start
[UseStaticMapper<BananaMapper>] // for c# language level ≥ 11
[UseStaticMapper(typeof(BananaMapper))] // for c# language level < 11
[UseStaticMapper(typeof(BananaMapper))]
// highlight-end
public static partial class BoxMapper
{
Expand Down
2 changes: 1 addition & 1 deletion test/Riok.Mapperly.Tests/Mapping/UseStaticMapperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ record BExternal();
static class OtherMapper { public static BExternal ToBExternal(AExternal source) => new BExternal(); }
[Mapper]
[UseStaticMapper<OtherMapper>]
[UseStaticMapper(typeof(OtherMapper))]
public partial class Mapper
{
partial B Map(A source);
Expand Down

0 comments on commit 82a2e9c

Please sign in to comment.