Environment
- Pythonnet version: 2.5.1
- Python version: 3.7.7
- Operating System: Windows 10 (10.0.1863 Build 18363)
Details
- Describe what you were trying to get done.
The .Net Framework assembly I'm using has been obfuscated.
- Most classes in the assembly implement properties for ISomeInterface
- Property names on classes have been obfuscated into gibberish, including property names that implement ISomeInterface
- In C# I can get at ISomeInterface properties when the object is cast to type ISomeInterface
- In python+pythonnet the ISomeInterface properties are not available. I do see property names that are obfuscated gibberish.
My workaround in python+pythonnet is to call the get_{interfacepropertyname} and set_{interfacepropertyname} methods that are available. Pythonnet apparently sees that an interface is implemented.
If it helps I can make a simple obfuscated .Net Framework assembly showing this issue.
What are your thoughts? I'm new to Python and maybe there is a way to cast an object to an interface that I'm not seeing. Thanks.
Reactions are currently unavailable
Environment
Details
The .Net Framework assembly I'm using has been obfuscated.
My workaround in python+pythonnet is to call the get_{interfacepropertyname} and set_{interfacepropertyname} methods that are available. Pythonnet apparently sees that an interface is implemented.
If it helps I can make a simple obfuscated .Net Framework assembly showing this issue.
What are your thoughts? I'm new to Python and maybe there is a way to cast an object to an interface that I'm not seeing. Thanks.