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

TreeView<X> support #267

Open
tznind opened this issue Dec 22, 2023 · 0 comments
Open

TreeView<X> support #267

tznind opened this issue Dec 22, 2023 · 0 comments

Comments

@tznind
Copy link
Collaborator

tznind commented Dec 22, 2023

One of the cool things about TreeView is it's ability to support generics e.g.

      TreeView<FileSystemInfo> fileTree = new TreeView<FileSystemInfo>();
      TreeView<GameObject> tree = new TreeView<GameObject>();

I want to tackle this over the holiday period. At first I was worrying about the fact that the T type is arbitrary and likely tied to user code. Then I realized we can just parse the Roslyn code tree to find the names of the T classes and (if it's not a standard Type) declare our own completely empty ones pre compilation (i.e. at Open time)

e.g.

  // Just declare each of the users classes ourselves in memory
  class GameObject
  {

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

No branches or pull requests

1 participant