Created
October 22, 2019 20:02
-
-
Save lostmsu/124b11c49c98c4b558c4fdcfcd761c73 to your computer and use it in GitHub Desktop.
How to register converter for a generic type?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Python.Runtime; | |
class MyNonGenericTree | |
{ | |
} | |
PyTypeConversion<MyNonGenericTree>.Converter = tree => ...; | |
class MyTree<T> | |
{ | |
... | |
} | |
PyTypeConversion<MyTree<???>>.Converter = tree => ...; | |
// ^ what should I put in place of '???' so that my generic trees would be converted automatically ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment