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.
Fix calculating properties visibility which come from external library
- Loading branch information
1 parent
94e5909
commit b472faf
Showing
9 changed files
with
321 additions
and
2 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
109 changes: 108 additions & 1 deletion
109
...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
37 changes: 37 additions & 0 deletions
37
...tor.Test/MappingGenerator/TestCaseData/019_MappingPropertiesInheritedFromLibraryClass.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,37 @@ | ||
using Microsoft.AspNet.Identity.EntityFramework; | ||
using System; | ||
|
||
namespace TestAutoMapper | ||
{ | ||
public static class ExternalUserTest | ||
{ | ||
public static ApplicationUserEntity [|ToEntity|](this UserModel model) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
public class UserModel | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public virtual string Email { get; set; } | ||
|
||
public virtual bool EmailConfirmed { get; set; } | ||
|
||
public virtual string PasswordHash { get; set; } | ||
|
||
public virtual string SecurityStamp { get; set; } | ||
|
||
public virtual string PhoneNumber { get; set; } | ||
public virtual bool PhoneNumberConfirmed { get; set; } | ||
|
||
} | ||
|
||
public class ApplicationUserEntity: IdentityUser | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...st/MappingGenerator/TestCaseData/019_MappingPropertiesInheritedFromLibraryClass_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,47 @@ | ||
using Microsoft.AspNet.Identity.EntityFramework; | ||
using System; | ||
|
||
namespace TestAutoMapper | ||
{ | ||
public static class ExternalUserTest | ||
{ | ||
public static ApplicationUserEntity ToEntity(this UserModel model) | ||
{ | ||
return new ApplicationUserEntity() | ||
{ | ||
NewProperty1 = model.NewProperty1, | ||
NewProperty2 = model.NewProperty2, | ||
Email = model.Email, | ||
EmailConfirmed = model.EmailConfirmed, | ||
PasswordHash = model.PasswordHash, | ||
SecurityStamp = model.SecurityStamp, | ||
PhoneNumber = model.PhoneNumber, | ||
PhoneNumberConfirmed = model.PhoneNumberConfirmed | ||
}; | ||
} | ||
} | ||
|
||
public class UserModel | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public virtual string Email { get; set; } | ||
|
||
public virtual bool EmailConfirmed { get; set; } | ||
|
||
public virtual string PasswordHash { get; set; } | ||
|
||
public virtual string SecurityStamp { get; set; } | ||
|
||
public virtual string PhoneNumber { get; set; } | ||
public virtual bool PhoneNumberConfirmed { get; set; } | ||
|
||
} | ||
|
||
public class ApplicationUserEntity: IdentityUser | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ingGenerator/TestCaseData/020_MappingPropertiesInConstructorInheritedFromLibraryClass.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,34 @@ | ||
using Microsoft.AspNet.Identity.EntityFramework; | ||
using System; | ||
|
||
namespace TestAutoMapper | ||
{ | ||
public class UserModel | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public virtual string Email { get; set; } | ||
|
||
public virtual bool EmailConfirmed { get; set; } | ||
|
||
public virtual string PasswordHash { get; set; } | ||
|
||
public virtual string SecurityStamp { get; set; } | ||
|
||
public virtual string PhoneNumber { get; set; } | ||
public virtual bool PhoneNumberConfirmed { get; set; } | ||
|
||
} | ||
|
||
public class ApplicationUserEntity: IdentityUser | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public [|ApplicationUserEntity|](UserModel model) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...erator/TestCaseData/020_MappingPropertiesInConstructorInheritedFromLibraryClass_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,41 @@ | ||
using Microsoft.AspNet.Identity.EntityFramework; | ||
using System; | ||
|
||
namespace TestAutoMapper | ||
{ | ||
public class UserModel | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public virtual string Email { get; set; } | ||
|
||
public virtual bool EmailConfirmed { get; set; } | ||
|
||
public virtual string PasswordHash { get; set; } | ||
|
||
public virtual string SecurityStamp { get; set; } | ||
|
||
public virtual string PhoneNumber { get; set; } | ||
public virtual bool PhoneNumberConfirmed { get; set; } | ||
|
||
} | ||
|
||
public class ApplicationUserEntity: IdentityUser | ||
{ | ||
public string NewProperty1 { get; set; } | ||
public string NewProperty2 { get; set; } | ||
|
||
public ApplicationUserEntity(UserModel model) | ||
{ | ||
NewProperty1 = model.NewProperty1; | ||
NewProperty2 = model.NewProperty2; | ||
Email = model.Email; | ||
EmailConfirmed = model.EmailConfirmed; | ||
PasswordHash = model.PasswordHash; | ||
SecurityStamp = model.SecurityStamp; | ||
PhoneNumber = model.PhoneNumber; | ||
PhoneNumberConfirmed = model.PhoneNumberConfirmed; | ||
} | ||
} | ||
} |
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