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

Skip to content

Commit e5c7ec1

Browse files
committed
Fixed errors breaking .NET Remoting on method invoke (#276)
1 parent df2aa64 commit e5c7ec1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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)