Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add option to disable automatic discovery of user implemented m…
…apping method and to include/exclude specific user implemented mapping methods (#1070) Add a boolean AutoUserMappings property to the AutoUserMappings whether to auto-discover user implemented mappings Introduce a new attribute UserMappingAttribute with a boolean ignore property to ignore user implemented mappings
- Loading branch information
Showing
17 changed files
with
327 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Diagnostics; | ||
|
||
namespace Riok.Mapperly.Abstractions; | ||
|
||
/// <summary> | ||
/// A given method is marked as user implemented mapping with this attribute. | ||
/// If <see cref="MapperAttribute.AutoUserMappings"/> is <c>true</c>, | ||
/// this attribute allows to ignore a user implemented mapping method. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method)] | ||
[Conditional("MAPPERLY_ABSTRACTIONS_SCOPE_RUNTIME")] | ||
public sealed class UserMappingAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Whether this user mapping should be ignored. | ||
/// </summary> | ||
public bool Ignore { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.