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

Find someway to make XML literals target typed to construct arbitrary objects #110

Open
AnthonyDGreen opened this issue Jun 28, 2017 · 0 comments

Comments

@AnthonyDGreen
Copy link
Contributor

There are two uses I have in mind.

The first is decoupling XML literals from XLinq. So, for example, allowing XML literals to construct WinRT Windows.Data.Xml objects.

The second is basically XAML literals. We use XML literals all throughout the Roslyn test base to describe all kinds of testing scenarios but it's all parsed and created at runtime. What if we could use target typing to actually have that expression create an object graph. Lucian had been thinking about way of doing this involving methods declaring that they Handles a particular element or attribute appearing in source. Could be worthwhile.

Powerful, but maybe too much complexity? We need a more thought out design.

Could also cheat and do this with #107 I suppose.

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

1 participant