Files
tgstation-server/_session_persistor_8cs_source.html

377 lines
71 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tgstation-server: src/Tgstation.Server.Host/Components/Session/SessionPersistor.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">tgstation-server<span id="projectnumber">&#160;6.19.3</span>
</div>
<div id="projectbrief">The /tg/station 13 server suite</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_34761767c1c3cd212f9d2f80ea0828a8.html">Tgstation.Server.Host</a></li><li class="navelem"><a class="el" href="dir_7a3fd032a1362a6005a1fc9227a8dd86.html">Components</a></li><li class="navelem"><a class="el" href="dir_f5938f3ae6ef69fa99e4683082cea79c.html">Session</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">SessionPersistor.cs</div></div>
</div><!--header-->
<div class="contents">
<a href="_session_persistor_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">using </span>System;</div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">using </span>System.Linq;</div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">using </span>System.Threading;</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">using </span>System.Threading.Tasks;</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="keyword">using </span>Microsoft.EntityFrameworkCore;</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">using </span>Microsoft.Extensions.Logging;</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment.html">Tgstation.Server.Host.Components.Deployment</a>;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a>;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_models.html">Tgstation.Server.Host.Models</a>;</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_system.html">Tgstation.Server.Host.System</a>;</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session.html">Tgstation.Server.Host.Components.Session</a></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>{</div>
<div class="foldopen" id="foldopen00017" data-start="{" data-end="};">
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html"> 17</a></span> <span class="keyword">sealed</span> <span class="keyword">class </span><a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html">SessionPersistor</a> : <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_persistor.html">ISessionPersistor</a></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> {</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08"> 22</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html">IDatabaseContextFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9"> 27</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html">IDmbFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0"> 32</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor.html">IProcessExecutor</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">processExecutor</a>;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f"> 37</a></span> readonly ILogger&lt;SessionPersistor&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150"> 42</a></span> readonly <a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_instance.html">Api.Models.Instance</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="foldopen" id="foldopen00052" data-start="{" data-end="}">
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#abe5082b7b4dc502b717e946a90349bb6"> 52</a></span> <span class="keyword">public</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#abe5082b7b4dc502b717e946a90349bb6">SessionPersistor</a>(</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html">IDatabaseContextFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>,</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html">IDmbFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a>,</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor.html">IProcessExecutor</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">processExecutor</a>,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> ILogger&lt;SessionPersistor&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>,</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> Api.Models.Instance <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> this.databaseContextFactory = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>));</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> this.dmbFactory = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a>));</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> this.processExecutor = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">processExecutor</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">processExecutor</a>));</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> this.logger = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>));</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> this.metadata = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>));</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#acf4ff5319507dc5a79726921ab341187"> 67</a></span> <span class="keyword">public</span> ValueTask <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#acf4ff5319507dc5a79726921ab341187">Save</a>(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_reattach_information.html">ReattachInformation</a> reattachInformation, CancellationToken cancellationToken) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a1da664d7237dbec5a6cb9ce04b79ccc1">UseContext</a>(async (db) =&gt;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> ArgumentNullException.ThrowIfNull(reattachInformation);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Saving reattach information: {info}...&quot;</span>, reattachInformation);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> await <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#af7789658917d10b7f4fd9a6284d244f4">ClearImpl</a>(db, <span class="keyword">false</span>, cancellationToken);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> var dbReattachInfo = <span class="keyword">new</span> Models.ReattachInformation(reattachInformation.AccessIdentifier)</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> CompileJobId = reattachInformation.Dmb.CompileJob.Require(x =&gt; x.Id),</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> InitialCompileJobId = reattachInformation.InitialDmb?.CompileJob.Require(x =&gt; x.Id),</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> Port = reattachInformation.Port,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> ProcessId = reattachInformation.ProcessId,</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_enumeration" href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session.html#a3a9adb69be732dbd67aef59559f830c2">RebootState</a> = reattachInformation.RebootState,</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> LaunchSecurityLevel = reattachInformation.LaunchSecurityLevel,</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> LaunchVisibility = reattachInformation.LaunchVisibility,</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> TopicPort = reattachInformation.TopicPort,</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> };</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> db.ReattachInformations.Add(dbReattachInfo);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> await db.Save(cancellationToken);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> reattachInformation.Id = dbReattachInfo.Id!.Value;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogDebug(<span class="stringliteral">&quot;Saved reattach information: {info}&quot;</span>, reattachInformation);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> });</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a5b474f446d9e672be12af82e7f7213bd"> 95</a></span> <span class="keyword">public</span> ValueTask <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a5b474f446d9e672be12af82e7f7213bd">Update</a>(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_reattach_information.html">ReattachInformation</a> reattachInformation, CancellationToken cancellationToken) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a0804dcd2b607f4e8c5b46c8c05f04926">UseContextTaskReturn</a>(async db =&gt;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> ArgumentNullException.ThrowIfNull(reattachInformation);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">if</span> (!reattachInformation.Id.HasValue)</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">throw</span> <span class="keyword">new</span> InvalidOperationException(<span class="stringliteral">&quot;Provided reattachInformation has no Id!&quot;</span>);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Updating reattach information: {info}...&quot;</span>, reattachInformation);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> var dbReattachInfo = <span class="keyword">new</span> Models.ReattachInformation(String.Empty)</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> Id = reattachInformation.Id.Value,</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> };</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> db.ReattachInformations.Attach(dbReattachInfo);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> dbReattachInfo.AccessIdentifier = reattachInformation.AccessIdentifier;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> dbReattachInfo.CompileJobId = reattachInformation.Dmb.CompileJob.Require(x =&gt; x.Id);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> dbReattachInfo.InitialCompileJobId = reattachInformation.InitialDmb?.CompileJob.Require(x =&gt; x.Id);</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> dbReattachInfo.Port = reattachInformation.Port;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> dbReattachInfo.ProcessId = reattachInformation.ProcessId;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> dbReattachInfo.RebootState = reattachInformation.RebootState;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> dbReattachInfo.LaunchSecurityLevel = reattachInformation.LaunchSecurityLevel;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> dbReattachInfo.LaunchVisibility = reattachInformation.LaunchVisibility;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> dbReattachInfo.TopicPort = reattachInformation.TopicPort;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> await db.Save(cancellationToken);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogDebug(<span class="stringliteral">&quot;Updated reattach information: {info}&quot;</span>, reattachInformation);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> });</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
<div class="foldopen" id="foldopen00126" data-start="{" data-end="}">
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a89dd7970dd66a8630f036c9ecc67e834"> 126</a></span> <span class="keyword">public</span> async ValueTask&lt;ReattachInformation?&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a89dd7970dd66a8630f036c9ecc67e834">Load</a>(CancellationToken cancellationToken)</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> Models.ReattachInformation? result = <span class="keyword">null</span>;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> TimeSpan? topicTimeout = <span class="keyword">null</span>;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> async ValueTask KillProcess(Models.ReattachInformation reattachInfo)</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> {</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> await <span class="keyword">using </span>var process = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">processExecutor</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor.html#a82c1c9bbc432577594f49417c969849f">GetProcess</a>(reattachInfo.ProcessId);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (process != <span class="keyword">null</span>)</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (reattachInfo == result)</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogWarning(<span class="stringliteral">&quot;Killing PID {pid} associated with CompileJob-less reattach information...&quot;</span>, reattachInfo.ProcessId);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">else</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> {</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogWarning(<span class="stringliteral">&quot;Killing PID {pid} associated with extra reattach information...&quot;</span>, reattachInfo.ProcessId);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> process.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html#a840da56ea51a4bbbc6b21667cc6355a2">Terminate</a>();</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> await process.Lifetime;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> }</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">catch</span> (<a class="code hl_class" href="class_exception.html">Exception</a> ex)</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> {</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogWarning(ex, <span class="stringliteral">&quot;Failed to kill process!&quot;</span>);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> }</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> }</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a1da664d7237dbec5a6cb9ce04b79ccc1">UseContext</a>(async (db) =&gt;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> var dbReattachInfos = await db</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> .ReattachInformations</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> .Where(x =&gt; x.CompileJob!.Job.Instance!.Id == <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>.Id)</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> .Include(x =&gt; x.CompileJob)</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> .Include(x =&gt; x.InitialCompileJob)</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> .ToListAsync(cancellationToken);</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> result = dbReattachInfos.FirstOrDefault();</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">if</span> (result == <span class="keyword">null</span>)</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> var timeoutMilliseconds = await db</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> .Instances</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> .Where(x =&gt; x.Id == <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>.Id)</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> .Select(x =&gt; x.DreamDaemonSettings!.TopicRequestTimeout)</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> .FirstOrDefaultAsync(cancellationToken);</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">if</span> (timeoutMilliseconds == <span class="keywordflow">default</span>)</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> {</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogCritical(<span class="stringliteral">&quot;Missing TopicRequestTimeout!&quot;</span>);</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> }</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> topicTimeout = TimeSpan.FromMilliseconds(timeoutMilliseconds.Value);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordtype">bool</span> first = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">foreach</span> (var reattachInfo <span class="keywordflow">in</span> dbReattachInfos)</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> {</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">if</span> (first)</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> {</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> first = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> await KillProcess(reattachInfo);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> db.ReattachInformations.Remove(reattachInfo);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Deleting ReattachInformation {id}...&quot;</span>, reattachInfo.Id);</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> }</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> await db.Save(cancellationToken);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> });</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">if</span> (!topicTimeout.HasValue)</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> {</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogDebug(<span class="stringliteral">&quot;Reattach information not found!&quot;</span>);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> <span class="keyword">null</span>;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> }</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> var dmb = await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html#a2f961f7ceac8fb41a79f40af65179ce0">FromCompileJob</a>(result!.<a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_models_1_1_compile_job.html">CompileJob</a>!, <span class="stringliteral">&quot;Session Loading Main Deployment&quot;</span>, cancellationToken);</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">if</span> (dmb == <span class="keyword">null</span>)</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> {</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogError(<span class="stringliteral">&quot;Unable to reattach! Could not load .dmb!&quot;</span>);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> await KillProcess(result);</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a1da664d7237dbec5a6cb9ce04b79ccc1">UseContext</a>(async db =&gt;</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> {</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Deleting ReattachInformation {id}...&quot;</span>, result.Id);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> await db</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> .ReattachInformations</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> .Where(x =&gt; x.Id == result.Id)</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> .ExecuteDeleteAsync(cancellationToken);</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> });</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordflow">return</span> <span class="keyword">null</span>;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> }</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_provider.html">IDmbProvider</a>? initialDmb = <span class="keyword">null</span>;</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">if</span> (result.InitialCompileJob != <span class="keyword">null</span>)</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> {</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Loading initial compile job...&quot;</span>);</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> initialDmb = await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">dmbFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html#a2f961f7ceac8fb41a79f40af65179ce0">FromCompileJob</a>(result.InitialCompileJob, <span class="stringliteral">&quot;Session Loading Initial Deployment&quot;</span>, cancellationToken);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> }</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogTrace(<span class="stringliteral">&quot;Retrieved ReattachInformation&quot;</span>);</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> </div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> var info = <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_reattach_information.html">ReattachInformation</a>(</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> result,</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> dmb,</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> initialDmb,</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> topicTimeout.Value);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogDebug(<span class="stringliteral">&quot;Reattach information loaded: {info}&quot;</span>, info);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordflow">return</span> info;</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> }</div>
</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#ac3551d3e6a6a17ef85ac39c506c32d5f"> 245</a></span> <span class="keyword">public</span> ValueTask <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#ac3551d3e6a6a17ef85ac39c506c32d5f">Clear</a>(CancellationToken cancellationToken) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">databaseContextFactory</a></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> .<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a1da664d7237dbec5a6cb9ce04b79ccc1">UseContext</a>(</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> db =&gt;</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> {</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">logger</a>.LogDebug(<span class="stringliteral">&quot;Clearing reattach information&quot;</span>);</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#af7789658917d10b7f4fd9a6284d244f4">ClearImpl</a>(db, <span class="keyword">true</span>, cancellationToken);</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> });</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> </div>
<div class="foldopen" id="foldopen00260" data-start="{" data-end="}">
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#af7789658917d10b7f4fd9a6284d244f4"> 260</a></span> async ValueTask <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#af7789658917d10b7f4fd9a6284d244f4">ClearImpl</a>(<a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html">IDatabaseContext</a> databaseContext, <span class="keywordtype">bool</span> instant, CancellationToken cancellationToken)</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> {</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> var baseQuery = databaseContext</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> .<a class="code hl_property" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html#aa06e331aeed4c0680e33e0aa2bcf81cf">ReattachInformations</a></div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> .Where(x =&gt; x.CompileJob!.Job.Instance!.Id == <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">metadata</a>.Id);</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <span class="keywordflow">if</span> (instant)</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> await baseQuery</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> .ExecuteDeleteAsync(cancellationToken);</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="keywordflow">else</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> {</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> var results = await baseQuery.ToListAsync(cancellationToken);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">foreach</span> (var result <span class="keywordflow">in</span> results)</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> databaseContext.<a class="code hl_property" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html#aa06e331aeed4c0680e33e0aa2bcf81cf">ReattachInformations</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_collection.html#ad270ec18822a7a90d8fca9a75c23851a">Remove</a>(result);</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> }</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> }</div>
</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> }</div>
</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span>}</div>
<div class="ttc" id="aclass_exception_html"><div class="ttname"><a href="class_exception.html">Exception</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_models_1_1_instance_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_instance.html">Tgstation.Server.Api.Models.Instance</a></div><div class="ttdoc">Metadata about a server instance.</div><div class="ttdef"><b>Definition</b> <a href="_tgstation_8_server_8_api_2_models_2_instance_8cs_source.html#l00008">Instance.cs:9</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_reattach_information_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_reattach_information.html">Tgstation.Server.Host.Components.Session.ReattachInformation</a></div><div class="ttdoc">Parameters necessary for duplicating a ISessionController session.</div><div class="ttdef"><b>Definition</b> <a href="_components_2_session_2_reattach_information_8cs_source.html#l00013">ReattachInformation.cs:14</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html">Tgstation.Server.Host.Components.Session.SessionPersistor</a></div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00017">SessionPersistor.cs:18</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a0ef7e017c943539a83aca36c6a1bba4f"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a0ef7e017c943539a83aca36c6a1bba4f">Tgstation.Server.Host.Components.Session.SessionPersistor.logger</a></div><div class="ttdeci">readonly ILogger&lt; SessionPersistor &gt; logger</div><div class="ttdoc">The ILogger for the SessionPersistor.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00037">SessionPersistor.cs:37</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a1e099a9da77ecb396147ac6c4e85f4f0"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a1e099a9da77ecb396147ac6c4e85f4f0">Tgstation.Server.Host.Components.Session.SessionPersistor.processExecutor</a></div><div class="ttdeci">readonly IProcessExecutor processExecutor</div><div class="ttdoc">The IProcessExecutor for the SessionPersistor.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00032">SessionPersistor.cs:32</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a2227915dc11711ab8eac49598f9bda08"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a2227915dc11711ab8eac49598f9bda08">Tgstation.Server.Host.Components.Session.SessionPersistor.databaseContextFactory</a></div><div class="ttdeci">readonly IDatabaseContextFactory databaseContextFactory</div><div class="ttdoc">The IDatabaseContextFactory for the SessionPersistor.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00022">SessionPersistor.cs:22</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a3942d5832fa872589b17d1ea8b6d7150"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a3942d5832fa872589b17d1ea8b6d7150">Tgstation.Server.Host.Components.Session.SessionPersistor.metadata</a></div><div class="ttdeci">readonly Api.Models.Instance metadata</div><div class="ttdoc">The Api.Models.Instance for the SessionPersistor.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00042">SessionPersistor.cs:42</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a5b474f446d9e672be12af82e7f7213bd"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a5b474f446d9e672be12af82e7f7213bd">Tgstation.Server.Host.Components.Session.SessionPersistor.Update</a></div><div class="ttdeci">ValueTask Update(ReattachInformation reattachInformation, CancellationToken cancellationToken)</div><div class="ttdoc">Update some reattachInformation .A ValueTask representing the running operation.</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a732863bb9fd35fece0bb2c926b55f8e9"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a732863bb9fd35fece0bb2c926b55f8e9">Tgstation.Server.Host.Components.Session.SessionPersistor.dmbFactory</a></div><div class="ttdeci">readonly IDmbFactory dmbFactory</div><div class="ttdoc">The IDmbFactory for the SessionPersistor.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00027">SessionPersistor.cs:27</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_a89dd7970dd66a8630f036c9ecc67e834"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#a89dd7970dd66a8630f036c9ecc67e834">Tgstation.Server.Host.Components.Session.SessionPersistor.Load</a></div><div class="ttdeci">async ValueTask&lt; ReattachInformation?&gt; Load(CancellationToken cancellationToken)</div><div class="ttdoc">Load a saved ReattachInformation.A ValueTask&lt;TResult&gt; resulting in the stored ReattachInformation if ...</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00126">SessionPersistor.cs:126</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_abe5082b7b4dc502b717e946a90349bb6"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#abe5082b7b4dc502b717e946a90349bb6">Tgstation.Server.Host.Components.Session.SessionPersistor.SessionPersistor</a></div><div class="ttdeci">SessionPersistor(IDatabaseContextFactory databaseContextFactory, IDmbFactory dmbFactory, IProcessExecutor processExecutor, ILogger&lt; SessionPersistor &gt; logger, Api.Models.Instance metadata)</div><div class="ttdoc">Initializes a new instance of the SessionPersistor class.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00052">SessionPersistor.cs:52</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_ac3551d3e6a6a17ef85ac39c506c32d5f"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#ac3551d3e6a6a17ef85ac39c506c32d5f">Tgstation.Server.Host.Components.Session.SessionPersistor.Clear</a></div><div class="ttdeci">ValueTask Clear(CancellationToken cancellationToken)</div><div class="ttdoc">Clear any stored ReattachInformation.A ValueTask representing the running operation.</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_acf4ff5319507dc5a79726921ab341187"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#acf4ff5319507dc5a79726921ab341187">Tgstation.Server.Host.Components.Session.SessionPersistor.Save</a></div><div class="ttdeci">ValueTask Save(ReattachInformation reattachInformation, CancellationToken cancellationToken)</div><div class="ttdoc">Save some reattachInformation .A ValueTask representing the running operation.</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor_html_af7789658917d10b7f4fd9a6284d244f4"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html#af7789658917d10b7f4fd9a6284d244f4">Tgstation.Server.Host.Components.Session.SessionPersistor.ClearImpl</a></div><div class="ttdeci">async ValueTask ClearImpl(IDatabaseContext databaseContext, bool instant, CancellationToken cancellationToken)</div><div class="ttdoc">Clear any stored ReattachInformation.</div><div class="ttdef"><b>Definition</b> <a href="_session_persistor_8cs_source.html#l00260">SessionPersistor.cs:260</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_models_1_1_compile_job_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_models_1_1_compile_job.html">Tgstation.Server.Host.Models.CompileJob</a></div><div class="ttdef"><b>Definition</b> <a href="_tgstation_8_server_8_host_2_models_2_compile_job_8cs_source.html#l00010">CompileJob.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html">Tgstation.Server.Host.Components.Deployment.IDmbFactory</a></div><div class="ttdoc">Factory for IDmbProviders.</div><div class="ttdef"><b>Definition</b> <a href="_i_dmb_factory_8cs_source.html#l00013">IDmbFactory.cs:14</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory_html_a2f961f7ceac8fb41a79f40af65179ce0"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_factory.html#a2f961f7ceac8fb41a79f40af65179ce0">Tgstation.Server.Host.Components.Deployment.IDmbFactory.FromCompileJob</a></div><div class="ttdeci">ValueTask&lt; IDmbProvider?&gt; FromCompileJob(CompileJob compileJob, string reason, CancellationToken cancellationToken, [CallerFilePath] string? callerFile=null, [CallerLineNumber] int callerLine=default)</div><div class="ttdoc">Gets a IDmbProvider for a given CompileJob.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_provider_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_i_dmb_provider.html">Tgstation.Server.Host.Components.Deployment.IDmbProvider</a></div><div class="ttdoc">Provides absolute paths to the latest compiled .dmbs.</div><div class="ttdef"><b>Definition</b> <a href="_i_dmb_provider_8cs_source.html#l00010">IDmbProvider.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_persistor_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_persistor.html">Tgstation.Server.Host.Components.Session.ISessionPersistor</a></div><div class="ttdoc">Handles saving and loading ReattachInformation.</div><div class="ttdef"><b>Definition</b> <a href="_i_session_persistor_8cs_source.html#l00009">ISessionPersistor.cs:10</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_collection_html_ad270ec18822a7a90d8fca9a75c23851a"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_collection.html#ad270ec18822a7a90d8fca9a75c23851a">Tgstation.Server.Host.Database.IDatabaseCollection.Remove</a></div><div class="ttdeci">void Remove(TModel model)</div><div class="ttdoc">Remove a given model from the the working set.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html">Tgstation.Server.Host.Database.IDatabaseContextFactory</a></div><div class="ttdoc">Factory for scoping usage of IDatabaseContexts. Meant for use by Components.</div><div class="ttdef"><b>Definition</b> <a href="_i_database_context_factory_8cs_source.html#l00009">IDatabaseContextFactory.cs:10</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory_html_a0804dcd2b607f4e8c5b46c8c05f04926"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a0804dcd2b607f4e8c5b46c8c05f04926">Tgstation.Server.Host.Database.IDatabaseContextFactory.UseContextTaskReturn</a></div><div class="ttdeci">ValueTask UseContextTaskReturn(Func&lt; IDatabaseContext, Task &gt; operation)</div><div class="ttdoc">Run an operation in the scope of an IDatabaseContext.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory_html_a1da664d7237dbec5a6cb9ce04b79ccc1"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_factory.html#a1da664d7237dbec5a6cb9ce04b79ccc1">Tgstation.Server.Host.Database.IDatabaseContextFactory.UseContext</a></div><div class="ttdeci">ValueTask UseContext(Func&lt; IDatabaseContext, ValueTask &gt; operation)</div><div class="ttdoc">Run an operation in the scope of an IDatabaseContext.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html">Tgstation.Server.Host.Database.IDatabaseContext</a></div><div class="ttdoc">Represents the database.</div><div class="ttdef"><b>Definition</b> <a href="_i_database_context_8cs_source.html#l00016">IDatabaseContext.cs:17</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_html_aa06e331aeed4c0680e33e0aa2bcf81cf"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html#aa06e331aeed4c0680e33e0aa2bcf81cf">Tgstation.Server.Host.Database.IDatabaseContext.ReattachInformations</a></div><div class="ttdeci">IDatabaseCollection&lt; ReattachInformation &gt; ReattachInformations</div><div class="ttdoc">The DbSet&lt;TEntity&gt; for ReattachInformations.</div><div class="ttdef"><b>Definition</b> <a href="_i_database_context_8cs_source.html#l00086">IDatabaseContext.cs:86</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor.html">Tgstation.Server.Host.System.IProcessExecutor</a></div><div class="ttdoc">For launching IProcess'.</div><div class="ttdef"><b>Definition</b> <a href="_i_process_executor_8cs_source.html#l00010">IProcessExecutor.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor_html_a82c1c9bbc432577594f49417c969849f"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_executor.html#a82c1c9bbc432577594f49417c969849f">Tgstation.Server.Host.System.IProcessExecutor.GetProcess</a></div><div class="ttdeci">IProcess? GetProcess(int id)</div><div class="ttdoc">Get a IProcess by id .</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_html_a840da56ea51a4bbbc6b21667cc6355a2"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html#a840da56ea51a4bbbc6b21667cc6355a2">Tgstation.Server.Host.System.IProcess.Terminate</a></div><div class="ttdeci">void Terminate()</div><div class="ttdoc">Asycnhronously terminates the process.</div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment.html">Tgstation.Server.Host.Components.Deployment</a></div><div class="ttdef"><b>Definition</b> <a href="_deployment_lock_manager_8cs_source.html#l00012">DeploymentLockManager.cs:13</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session.html">Tgstation.Server.Host.Components.Session</a></div><div class="ttdef"><b>Definition</b> <a href="_api_validation_status_8cs_source.html#l00001">ApiValidationStatus.cs:2</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_html_a3a9adb69be732dbd67aef59559f830c2"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_session.html#a3a9adb69be732dbd67aef59559f830c2">Tgstation.Server.Host.Components.Session.RebootState</a></div><div class="ttdeci">RebootState</div><div class="ttdoc">Represents the action to take when /world/Reboot() is called.</div><div class="ttdef"><b>Definition</b> <a href="_reboot_state_8cs_source.html#l00006">RebootState.cs:7</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_database_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a></div><div class="ttdef"><b>Definition</b> <a href="_database_collection_8cs_source.html#l00009">DatabaseCollection.cs:10</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_models_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_models.html">Tgstation.Server.Host.Models</a></div><div class="ttdef"><b>Definition</b> <a href="_models_2_chat_bot_8cs_source.html#l00008">ChatBot.cs:9</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_system_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_system.html">Tgstation.Server.Host.System</a></div><div class="ttdef"><b>Definition</b> <a href="_assembly_information_provider_8cs_source.html#l00008">AssemblyInformationProvider.cs:9</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>