public IsolatedHostHandle(AppDomainIsolatedHost <T> isolation, IDisposable handle) { if (isolation == null) { throw new ArgumentNullException(nameof(isolation)); } if (handle == null) { throw new ArgumentNullException(nameof(handle)); } this.isolation = isolation; this.handle = handle; }
public static IDisposable StartHost(string hostName, string applicationBase, string applicationConfig) { try { var hostIsolation = new AppDomainIsolatedHost <T>(applicationBase, applicationConfig, hostName); var hostHandle = hostIsolation.Start(); return(new IsolatedHostHandle(hostIsolation, hostHandle)); } catch (Exception ex) { var error = ex.ToString(); Trace.TraceError($"Failed to start AppDomainIsolatedHost: {error}"); throw; } }