-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use correct user defined mapping configuration for nullable disa…
…bled queryable mappings (#1580)
- Loading branch information
Showing
5 changed files
with
108 additions
and
23 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
31 changes: 31 additions & 0 deletions
31
...jectionNullableTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.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,31 @@ | ||
//HintName: Mapper.g.cs | ||
// <auto-generated /> | ||
#nullable enable | ||
public partial class Mapper | ||
{ | ||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
public partial global::System.Linq.IQueryable<global::B?>? Map(global::System.Linq.IQueryable<global::A?>? q) | ||
{ | ||
if (q == null) | ||
return default; | ||
#nullable disable | ||
return System.Linq.Queryable.Select( | ||
q, | ||
x => new global::B() | ||
{ | ||
OtherValue = x.Value, | ||
} | ||
); | ||
#nullable enable | ||
} | ||
|
||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
private partial global::B? Map(global::A? source) | ||
{ | ||
if (source == null) | ||
return default; | ||
var target = new global::B(); | ||
target.OtherValue = source.Value; | ||
return target; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...ctionNullableTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.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,24 @@ | ||
//HintName: Mapper.g.cs | ||
// <auto-generated /> | ||
#nullable enable | ||
public partial class Mapper | ||
{ | ||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
public partial global::System.Linq.IQueryable<global::B?>? Map(global::System.Linq.IQueryable<global::A?>? q) | ||
{ | ||
if (q == null) | ||
return default; | ||
#nullable disable | ||
return System.Linq.Queryable.Select(q, x => new global::B(x.Value)); | ||
#nullable enable | ||
} | ||
|
||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
private partial global::B? Map(global::A? source) | ||
{ | ||
if (source == null) | ||
return default; | ||
var target = new global::B(source.Value); | ||
return target; | ||
} | ||
} |
e7738bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'SourceGeneratorBenchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
3
.Riok.Mapperly.Benchmarks.SourceGeneratorBenchmarks.Compile
2103807.791272096
ns (± 151815.69131161875
)120741.05671574519
ns (± 1678.1529391966976
)17.42
Riok.Mapperly.Benchmarks.SourceGeneratorBenchmarks.LargeCompile
45774493.12727273
ns (± 408908.7845536215
)1277208.939174107
ns (± 7926.104374412328
)35.84
This comment was automatically generated by workflow using github-action-benchmark.