public HostingShell(IRobotItem itemSpecification, IHostManager hostManager, IRobotPeer peer, IRobotStatics jstatics, string dllFileName) { robotPeer = peer; Init(true); Open(dllFileName); JniGlobalHandle hmHandle = ((IJvmProxy)hostManager).JvmHandle; JniGlobalHandle peerhandle = ((IJvmProxy)peer).JvmHandle; JniGlobalHandle itemHandle = ((IJvmProxy)itemSpecification).JvmHandle; domain.SetData("hostManager", hmHandle.DangerousGetHandle()); domain.SetData("peer", peerhandle.DangerousGetHandle()); domain.SetData("item", itemHandle.DangerousGetHandle()); var statics = serializer.ConvertJ2C <RobotStatics>(RbSerializerN.RobotStatics_TYPE, (Object)jstatics); domain.SetData("statics", statics); domain.SetData("robotName", statics.getName()); try { domain.DoCallBack(HostingSeed.Construct); } catch (Exception) { robotPeer.punishBadBehavior(BadBehavior.SECURITY_VIOLATION); } hmHandle.HoldThisHandle(); peerhandle.HoldThisHandle(); itemHandle.HoldThisHandle(); }
public HostingShell(IRobotItem itemSpecification, IHostManager hostManager, IRobotPeer peer, IRobotStatics jstatics, string dllFileName) { robotPeer = peer; Init(true); Open(dllFileName); JniGlobalHandle hmHandle = ((IJvmProxy) hostManager).JvmHandle; JniGlobalHandle peerhandle = ((IJvmProxy)peer).JvmHandle; JniGlobalHandle itemHandle = ((IJvmProxy)itemSpecification).JvmHandle; domain.SetData("hostManager", hmHandle.DangerousGetHandle()); domain.SetData("peer", peerhandle.DangerousGetHandle()); domain.SetData("item", itemHandle.DangerousGetHandle()); var statics = serializer.ConvertJ2C<RobotStatics>(RbSerializerN.RobotStatics_TYPE, (Object) jstatics); domain.SetData("statics", statics); domain.SetData("robotName", statics.getName()); try { domain.DoCallBack(HostingSeed.Construct); } catch (Exception) { robotPeer.punishBadBehavior(BadBehavior.SECURITY_VIOLATION); } hmHandle.HoldThisHandle(); peerhandle.HoldThisHandle(); itemHandle.HoldThisHandle(); }
public IHostingRobotProxy createRobotProxy(IHostManager hostManager, Object robotSpecification, IRobotStatics statics, IRobotPeer peer) { Object s = HiddenAccess.getFileSpecification(robotSpecification); var itemSpecification = Bridge.Cast<IRobotRepositoryItem>(s); string file = DllRootHelper.GetDllFileName(itemSpecification); HostingShell hostingShell = new HostingShell(itemSpecification, hostManager, peer, statics, file); return hostingShell; }
public IHostingRobotProxy createRobotProxy(IHostManager hostManager, Object robotSpecification, IRobotStatics statics, IRobotPeer peer) { Object s = HiddenAccess.getFileSpecification(robotSpecification); var itemSpecification = Bridge.Cast <IRobotRepositoryItem>(s); string file = DllRootHelper.GetDllFileName(itemSpecification); HostingShell hostingShell = new HostingShell(itemSpecification, hostManager, peer, statics, file); return(hostingShell); }