public IDisposable CreateExternalProcessObject(Type type, bool shared) { CheckRemoteType(type); ProcessHostController hc = GetHost(type.ToString(), shared, null); return((IDisposable)hc.CreateInstance(type.Assembly.Location, type.FullName, GetRequiredAddins(type))); }
ProcessHostController GetHost(string id, bool shared, IExecutionHandler executionHandler) { if (!shared) { return(new ProcessHostController(id, 0, executionHandler)); } lock (this) { if (externalProcess == null) { externalProcess = new ProcessHostController("SharedHostProcess", 10000, null); } return(externalProcess); } }
ProcessHostController GetHost (string id, bool shared, IExecutionHandler executionHandler) { if (!shared) return new ProcessHostController (id, 0, executionHandler); lock (this) { if (externalProcess == null) externalProcess = new ProcessHostController ("SharedHostProcess", 10000, null); return externalProcess; } }