This repository has been archived by the owner on Jan 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve converting plural to singular form for lambda parameter name
- Loading branch information
1 parent
6bc83f3
commit 5ea8c60
Showing
13 changed files
with
603 additions
and
39 deletions.
There are no files selected for viewing
261 changes: 261 additions & 0 deletions
261
...ingGenerator/MappingGenerator.Test/MappingGenerator/MappingGeneratorTestCases.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
25 changes: 25 additions & 0 deletions
25
...st/MappingGenerator/TestCaseData/012_CollectionMappingWithSingularLambdaParameterName.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,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace TestAutoMapper.Identity.X | ||
{ | ||
public class XX | ||
{ | ||
public int Id { get; set; } | ||
public string Name { get; set; } | ||
} | ||
|
||
public class YY | ||
{ | ||
public int Id { get; set; } | ||
public string Name { get; set; } | ||
} | ||
|
||
public static class Mapper{ | ||
|
||
public static List<YY> [|Map|](List<XX> categories) | ||
{ | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...pingGenerator/TestCaseData/012_CollectionMappingWithSingularLambdaParameterName_FIXED.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,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace TestAutoMapper.Identity.X | ||
{ | ||
public class XX | ||
{ | ||
public int Id { get; set; } | ||
public string Name { get; set; } | ||
} | ||
|
||
public class YY | ||
{ | ||
public int Id { get; set; } | ||
public string Name { get; set; } | ||
} | ||
|
||
public static class Mapper{ | ||
|
||
public static List<YY> Map(List<XX> categories) | ||
{ | ||
return categories.Select(category => new YY() | ||
{ | ||
Id = category.Id, | ||
Name = category.Name | ||
}).ToList(); | ||
} | ||
} | ||
} |
Oops, something went wrong.