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

[C#] Leverage source generator to eliminate reflection in CustomViewType #41

Open
chkn opened this issue Nov 30, 2020 · 0 comments
Open
Labels
lang: C# Specific to the C# API

Comments

@chkn
Copy link
Owner

chkn commented Nov 30, 2020

Since we have the source generator, we can use it to eliminate the reflection in CustomViewType.

One possible approach is:

  1. Expose CustomViewType as public API, and refactor it to allow subclassing.
  2. For each custom view, the source generator can implement a subclass of CustomViewType into the user assembly that staticly calls the Body property.
  3. The source generator adds a CustomViewAttribute to the View that points at (2).
@chkn chkn added the lang: C# Specific to the C# API label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: C# Specific to the C# API
Projects
None yet
Development

No branches or pull requests

1 participant