Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Riok.Mapperly.Abstractions; | ||
|
||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | ||
public class MapperIgnoreSourceValueAttribute : Attribute | ||
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / lint
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / build
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / build
|
||
{ | ||
/// <summary> | ||
/// Ignores the specified source enum value from the mapping. | ||
/// </summary> | ||
/// <param name="source">The source enum value to ignore.</param> | ||
public MapperIgnoreSourceValueAttribute(object source) | ||
Check warning on line 10 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 10 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / lint
|
||
{ | ||
SourceValue = (Enum)source; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the source enum value which should be ignored from the mapping. | ||
/// </summary> | ||
public Enum? SourceValue { get; } | ||
Check warning on line 18 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 18 in src/Riok.Mapperly.Abstractions/MapperIgnoreSourceValue.cs GitHub Actions / lint
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Riok.Mapperly.Abstractions; | ||
|
||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | ||
public class MapperIgnoreTargetValueAttribute : Attribute | ||
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / lint
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / build
Check warning on line 4 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / build
|
||
{ | ||
/// <summary> | ||
/// Ignores the specified target enum value from the mapping. | ||
/// </summary> | ||
/// <param name="target">The target enum value to ignore.</param> | ||
public MapperIgnoreTargetValueAttribute(object target) | ||
Check warning on line 10 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 10 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / lint
|
||
{ | ||
TargetValue = (Enum)target; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the target enum value which should be ignored from the mapping. | ||
/// </summary> | ||
public Enum? TargetValue { get; } | ||
Check warning on line 18 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / Analyze (csharp)
Check warning on line 18 in src/Riok.Mapperly.Abstractions/MapperIgnoreTargetValue.cs GitHub Actions / lint
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace Riok.Mapperly.Configuration; | ||
|
||
public record MapperIgnoreEnumValueConfiguration(IFieldSymbol Value); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace Riok.Mapperly.Configuration; | ||
|
||
public record struct MappingConfigurationReference(IMethodSymbol? Method, ITypeSymbol Source, ITypeSymbol Target); |