Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping interface to class #155

Open
D0ctorWh0 opened this issue Apr 1, 2024 · 1 comment
Open

Mapping interface to class #155

D0ctorWh0 opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@D0ctorWh0
Copy link

Is it possible to add mapping from interface to class? For example this throws error "[NGM025] Mapping from IA1 to A2 not supported":

public class A1 : IA1
{
     public string P1 { get; set; }
}
    
 public interface IA1
{
     public string P1 { get; set; }
}
    
public class A2
{
     public string P1 { get; set; }
}

/////////////////////////////////////////////

IA1 a1 = new A1() { P1 = "P1" };
A2 a2 = a1.Map<A2>();
@D0ctorWh0 D0ctorWh0 added the enhancement New feature or request label Apr 1, 2024
@DedAnton
Copy link
Owner

DedAnton commented Apr 3, 2024

This is theoretically possible, but will require significant changes to the code. I will add this task to the backlog, but I cannot say that this will be done in the near future. At the moment there is almost no development going on due to my being busy at my main job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

2 participants