private void CreateBridge() { var assemblyFile = Path.Combine(_appDomain.SetupInformation.ApplicationBase, "Totem.Runtime.dll"); _bridge = (RunCommandBridge)_appDomain.CreateInstanceFromAndUnwrap( assemblyFile, typeof(RunCommandBridge).FullName, ignoreCase: false, bindingAttr: BindingFlags.Default, binder: null, args: null, culture: null, activationAttributes: null); }
private void UnloadAppDomain() { try { AppDomain.Unload(_appDomain); } catch (Exception error) { Log.Error(error, "[runtime] Error while unloading app domain"); _result = -1; } _appDomain = null; _bridge = null; }