| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Now Python host can force raw encoding for autoconverted .NET types. Enables workaround for pythonnet#514
Now Python host can force raw encoding for autoconverted .NET types. Enables workaround for pythonnet#514
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1122 +/- ##
=======================================
Coverage 86.66% 86.66%
=======================================
Files 1 1
Lines 300 300
=======================================
Hits 260 260
Misses 40 40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Now Python host can force raw encoding for autoconverted .NET types.
What does this implement/fix? Explain your changes.
This class allows Python to override some automatic conversions done by Python.NET, which was otherwise impossible.
To do that, Python code can define a class derived from RawProxyEncoder, and override CanEncode to return True for the desired types. Create an instance of this class, and register it with Python.Runtime.PyObjectConversions.RegisterEncoder(instance) (see new test for example)
Does this close any currently open issues?
Enables workaround for #514
Checklist
Check all those that are applicable and complete.