IUgRemoting.dll
namespace test
{
public interface IUgRemoting
{
Session GetSession();
UFSession GetUFSession();
UI GetUI();
}
}
我用C#测试没有问题:
var loader = (IUgRemoting)Activator.GetObject(typeof(IUgRemoting), "ipc://test/test.ShareClass");
var theSession = loader.GetSession();
但是在Ironpython中就报错:
class NXOperators(object):
def __init__(self):
tmp= Activator.GetObject(IUgRemoting, "ipc://test/test.ShareClass")//error
self.theSession=tmp.GetSession()
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 程序集“IronPython, Version=2.7.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35”中的类型“IronPython.Runtime.CodeContext”未标记为可序列化。
请问我该怎样调用。net remoting是正确的?
My Program Tech Blog
My Professional Tech Blog