/// <inheritdoc /> public override void StopSilo(bool stopGracefully) { if (!IsActive) { return; } if (stopGracefully) { try { this.SiloHost.Shutdown(); } catch (RemotingException re) { WriteLog(re); /* Ignore error */ } catch (Exception exc) { WriteLog(exc); throw; } } ImportGeneratedAssemblies(); this.isActive = false; try { UnloadAppDomain(); } catch (Exception exc) { WriteLog(exc); throw; } this.SiloHost = null; }
/// <inheritdoc /> public override Task StopSiloAsync(bool stopGracefully) { if (!IsActive) { return(Task.CompletedTask); } if (stopGracefully) { try { this.SiloHost.Shutdown(); } catch (RemotingException re) { WriteLog(re); /* Ignore error */ } catch (Exception exc) { WriteLog(exc); throw; } } this.isActive = false; try { UnloadAppDomain(); } catch (Exception exc) { WriteLog(exc); throw; } this.SiloHost = null; return(Task.CompletedTask); }
/// <inheritdoc /> public override void StopSilo(bool stopGracefully) { if (!IsActive) return; if (stopGracefully) { try { this.SiloHost.Shutdown(); } catch (RemotingException re) { WriteLog(re); /* Ignore error */ } catch (Exception exc) { WriteLog(exc); throw; } } ImportGeneratedAssemblies(); this.isActive = false; try { UnloadAppDomain(); } catch (Exception exc) { WriteLog(exc); throw; } this.SiloHost = null; }