Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19d854c

Browse files
authored
Merge pull request #637 from callumnoble/fix-remoting
Fixed errors breaking .NET Remoting on method invoke (#276)
2 parents df2aa64 + f55ee1e commit 19d854c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
- Arvid JB ([@ArvidJB](https://github.com/ArvidJB))
1616
- Bradley Friedman ([@leith-bartrich](https://github.com/leith-bartrich))
17+
- Callum Noble ([@callumnoble](https://github.com/callumnoble))
1718
- Christian Heimes ([@tiran](https://github.com/tiran))
1819
- Christoph Gohlke ([@cgohlke](https://github.com/cgohlke))
1920
- Christopher Pow ([@christopherpow](https://github.com/christopherpow))

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
3030
- Fixed double calling of constructor when deriving from .NET class (#495)
3131
- Fixed `clr.GetClrType` when iterating over `System` members (#607)
3232
- Fixed `LockRecursionException` when loading assemblies (#627)
33+
- Fixed errors breaking .NET Remoting on method invoke (#276)
3334

3435

3536
## [2.3.0][] - 2017-03-11

src/runtime/converter.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,15 @@ internal static IntPtr ToPython(object value, Type type)
155155
var pyderived = value as IPythonDerivedType;
156156
if (null != pyderived)
157157
{
158+
#if NETSTANDARD
158159
return ClassDerivedObject.ToPython(pyderived);
160+
#else
161+
// if object is remote don't do this
162+
if (!System.Runtime.Remoting.RemotingServices.IsTransparentProxy(pyderived))
163+
{
164+
return ClassDerivedObject.ToPython(pyderived);
165+
}
166+
#endif
159167
}
160168

161169
// hmm - from Python, we almost never care what the declared

0 commit comments

Comments
 (0)