-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
975 additions
and
28 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "7.0.100", | ||
"rollForward": "minor" | ||
"version": "7.0.200", | ||
"rollForward": "latestPatch" | ||
} | ||
} |
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,11 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<DefineConstants>$(DefineConstants);ROSLYN4_4_OR_GREATER</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<Project> | ||
<ItemGroup> | ||
<Compile Remove="_snapshots\*"/> | ||
<Compile Remove="_snapshots\**"/> | ||
</ItemGroup> | ||
</Project> |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -303,4 +303,4 @@ private Riok.Mapperly.IntegrationTests.Models.InheritanceSubObject MapToInherita | |
return target; | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -358,4 +358,4 @@ private static Riok.Mapperly.IntegrationTests.Models.InheritanceSubObject MapToI | |
return target; | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...sts/_snapshots/Roslyn_4_5/CircularReferenceMapperTest.SnapshotGeneratedSource.verified.cs
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,26 @@ | ||
#nullable enable | ||
namespace Riok.Mapperly.IntegrationTests.Mapper | ||
{ | ||
public static partial class CircularReferenceMapper | ||
{ | ||
public static partial Riok.Mapperly.IntegrationTests.Dto.CircularReferenceDto ToDto(Riok.Mapperly.IntegrationTests.Models.CircularReferenceObject obj) | ||
{ | ||
return MapToCircularReferenceDto(obj, new Riok.Mapperly.Abstractions.ReferenceHandling.Internal.PreserveReferenceHandler()); | ||
} | ||
|
||
private static Riok.Mapperly.IntegrationTests.Dto.CircularReferenceDto MapToCircularReferenceDto(Riok.Mapperly.IntegrationTests.Models.CircularReferenceObject source, Riok.Mapperly.Abstractions.ReferenceHandling.IReferenceHandler refHandler) | ||
{ | ||
if (refHandler.TryGetReference<Riok.Mapperly.IntegrationTests.Models.CircularReferenceObject, Riok.Mapperly.IntegrationTests.Dto.CircularReferenceDto>(source, out var existingTargetReference)) | ||
return existingTargetReference; | ||
var target = new Riok.Mapperly.IntegrationTests.Dto.CircularReferenceDto(); | ||
refHandler.SetReference<Riok.Mapperly.IntegrationTests.Models.CircularReferenceObject, Riok.Mapperly.IntegrationTests.Dto.CircularReferenceDto>(source, target); | ||
if (source.Parent != null) | ||
{ | ||
target.Parent = MapToCircularReferenceDto(source.Parent, refHandler); | ||
} | ||
|
||
target.Value = source.Value; | ||
return target; | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
...perly.IntegrationTests/_snapshots/Roslyn_4_5/MapperTest.RunMappingShouldWork.verified.txt
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,66 @@ | ||
{ | ||
CtorValue: 7, | ||
CtorValue2: 100, | ||
IntValue: 10, | ||
IntInitOnlyValue: 3, | ||
RequiredValue: 4, | ||
StringValue: fooBar+after-map, | ||
RenamedStringValue2: fooBar2, | ||
FlatteningIdValue: 10, | ||
NullableFlatteningIdValue: 100, | ||
Unflattening: { | ||
IdValue: 20 | ||
}, | ||
NullableUnflattening: { | ||
IdValue: 200 | ||
}, | ||
NestedNullableIntValue: 100, | ||
NestedNullable: { | ||
IntValue: 100 | ||
}, | ||
NestedNullableTargetNotNullable: {}, | ||
StringNullableTargetNotNullable: fooBar3, | ||
RecursiveObject: { | ||
CtorValue: 5, | ||
CtorValue2: 100, | ||
RequiredValue: 4, | ||
StringValue: +after-map, | ||
RenamedStringValue2: , | ||
Unflattening: {}, | ||
NestedNullableTargetNotNullable: {}, | ||
StringNullableTargetNotNullable: , | ||
EnumValue: DtoValue1, | ||
EnumName: Value30, | ||
EnumStringValue: 0, | ||
EnumReverseStringValue: DtoValue3 | ||
}, | ||
SourceTargetSameObjectType: { | ||
CtorValue: 8, | ||
CtorValue2: 100, | ||
IntValue: 99, | ||
RequiredValue: 98, | ||
StringValue: , | ||
RenamedStringValue: , | ||
Flattening: {}, | ||
EnumReverseStringValue: | ||
}, | ||
NullableReadOnlyObjectCollection: [ | ||
{ | ||
IntValue: 10 | ||
}, | ||
{ | ||
IntValue: 20 | ||
} | ||
], | ||
EnumValue: DtoValue1, | ||
EnumName: Value10, | ||
EnumRawValue: 20, | ||
EnumStringValue: Value30, | ||
EnumReverseStringValue: DtoValue3, | ||
SubObject: { | ||
SubIntValue: 2, | ||
BaseIntValue: 1 | ||
}, | ||
DateTimeValueTargetDateOnly: 2020-01-03, | ||
DateTimeValueTargetTimeOnly: 3:10 PM | ||
} |
Oops, something went wrong.