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

domain components #3

Open
volkanalkilic opened this issue Oct 30, 2015 · 4 comments
Open

domain components #3

volkanalkilic opened this issue Oct 30, 2015 · 4 comments

Comments

@volkanalkilic
Copy link

is there a way to use with domain components?

@shamp00
Copy link
Member

shamp00 commented Nov 2, 2015

I don't know very much about domain components but it should work fine. Are you having trouble with it?

@volkanalkilic
Copy link
Author

Domain components defined as an interface so we can not create instance as follows;

image

@shamp00
Copy link
Member

shamp00 commented Nov 2, 2015

I see the problem now.

I'll give it some thought, but I can't see any easy way. C# does not allow you to create anonymous types with interfaces (although apparently it is possible in IL) but we need the class to provide the template for the modification.

If we use objectSpace.CreateObject<MyObject>(), then we can't pass in the field changes in a MemberInitExpression.

One approach might be to use a Func<MyObject> instead of a MemberInitExpression but there would be multiple assignment statements to parse and syntax would not be as pretty.

@volkanalkilic
Copy link
Author

It seems that there is no way now.
Thank you for your answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants