static public IResultOrError <IBrowserProcess> ReuseOrCreateProcess( this IApp app, Interface.BrowserProcessConfig browserProcessConfig = null) { var Process = app?.ReuseProcess(browserProcessConfig); if (!(Process?.Result).CanReuseProcess(browserProcessConfig)) { Process?.Result?.Kill(); Process = app?.CreateProcess(browserProcessConfig); } return(Process); }
/// <summary> /// Hosting App provides the BrowserProcessConfig as specified in UI. /// </summary> /// <param name="app"></param> /// <returns></returns> static public IResultOrError <IBrowserProcess> CreateProcess(this IApp app) => app.CreateProcess(null);