Files
tgstation-server/_repository_manager_8cs_source.html

384 lines
88 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/Repository/RepositoryManager.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_5d46d0c3fd1cac5ce1ea23751ad25792.html">Repository</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">RepositoryManager.cs</div></div>
</div><!--header-->
<div class="contents">
<a href="_repository_manager_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.Threading;</div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">using </span>System.Threading.Tasks;</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="keyword">using </span>LibGit2Sharp;</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </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><span class="keyword">using </span>Microsoft.Extensions.Options;</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </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_api_1_1_models.html">Tgstation.Server.Api.Models</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_components_1_1_events.html">Tgstation.Server.Host.Components.Events</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_configuration.html">Tgstation.Server.Host.Configuration</a>;</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_extensions.html">Tgstation.Server.Host.Extensions</a>;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_i_o.html">Tgstation.Server.Host.IO</a>;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_jobs.html">Tgstation.Server.Host.Jobs</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_utils.html">Tgstation.Server.Host.Utils</a>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</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_repository.html">Tgstation.Server.Host.Components.Repository</a></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span>{</div>
<div class="foldopen" id="foldopen00021" data-start="{" data-end="};">
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html"> 21</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_repository_1_1_repository_manager.html">RepositoryManager</a> : <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_repository_manager.html">IRepositoryManager</a></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8603cad6d9df4a2079d3249becd0bbbb"> 24</a></span> <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8603cad6d9df4a2079d3249becd0bbbb">InUse</a> =&gt; semaphore.CurrentCount == 0;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</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_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c"> 27</a></span> <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">CloneInProgress</a> { <span class="keyword">get</span>; <span class="keyword">private</span> <span class="keyword">set</span>; }</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_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129"> 32</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html">ILibGit2RepositoryFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</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_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62"> 37</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_commands.html">ILibGit2Commands</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">commands</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_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2"> 42</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html">IIOManager</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0"> 47</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html">IEventConsumer</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">eventConsumer</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<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_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd"> 52</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_post_write_handler.html">IPostWriteHandler</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">postWriteHandler</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3"> 57</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory.html">IGitRemoteFeaturesFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</a>;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb"> 62</a></span> readonly IOptionsMonitor&lt;GeneralConfiguration&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">generalConfigurationOptions</a>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</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_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf"> 67</a></span> readonly ILogger&lt;Repository&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">repositoryLogger</a>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070"> 72</a></span> readonly ILogger&lt;RepositoryManager&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27"> 77</a></span> readonly SemaphoreSlim <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="foldopen" id="foldopen00091" data-start="{" data-end="}">
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a232da072229fb69ff3d42a08c13960e2"> 91</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_repository_1_1_repository_manager.html#a232da072229fb69ff3d42a08c13960e2">RepositoryManager</a>(</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html">ILibGit2RepositoryFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>,</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_commands.html">ILibGit2Commands</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">commands</a>,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html">IIOManager</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>,</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html">IEventConsumer</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">eventConsumer</a>,</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_post_write_handler.html">IPostWriteHandler</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">postWriteHandler</a>,</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory.html">IGitRemoteFeaturesFactory</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</a>,</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> IOptionsMonitor&lt;GeneralConfiguration&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">generalConfigurationOptions</a>,</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> ILogger&lt;Repository&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">repositoryLogger</a>,</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> ILogger&lt;RepositoryManager&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>)</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> this.repositoryFactory = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</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_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>));</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> this.commands = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">commands</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_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">commands</a>));</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> this.ioManager = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</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_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>));</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> this.eventConsumer = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">eventConsumer</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_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">eventConsumer</a>));</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> this.postWriteHandler = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">postWriteHandler</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_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">postWriteHandler</a>));</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> this.gitRemoteFeaturesFactory = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</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_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</a>));</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> this.repositoryLogger = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">repositoryLogger</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_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">repositoryLogger</a>));</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> this.generalConfigurationOptions = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">generalConfigurationOptions</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_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">generalConfigurationOptions</a>));</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> this.logger = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">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_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>));</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a> = <span class="keyword">new</span> SemaphoreSlim(1);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="foldopen" id="foldopen00115" data-start="{" data-end="}">
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a61b0a56eced0f9e75057c0c9f17b5d1d"> 115</a></span> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a61b0a56eced0f9e75057c0c9f17b5d1d">Dispose</a>()</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> {</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Disposing...&quot;</span>);</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>.Dispose();</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aad9235dfb77b745164af1553b922573d"> 122</a></span> <span class="keyword">public</span> async ValueTask&lt;IRepository?&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aad9235dfb77b745164af1553b922573d">CloneRepository</a>(</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> Uri url,</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordtype">string</span>? initialBranch,</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">string</span>? username,</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">string</span>? password,</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html">JobProgressReporter</a> progressReporter,</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordtype">bool</span> recurseSubmodules,</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> CancellationToken cancellationToken)</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> ArgumentNullException.ThrowIfNull(url);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> lock (<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>)</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> {</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (<a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">CloneInProgress</a>)</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_exception.html">JobException</a>(<a class="code hl_enumeration" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#a1a6adb59dd51244efabf4e548e7075c8">ErrorCode</a>.RepoCloning);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">CloneInProgress</a> = <span class="keyword">true</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> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> var repositoryPath = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#a18a442b5dff16f5e7a730ec354e81d78">ResolvePath</a>();</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_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogInformation(<span class="stringliteral">&quot;Begin clone {url} to {path} (Branch: {initialBranch})&quot;</span>, url, repositoryPath, initialBranch);</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">try</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> <span class="keyword">using</span> (await <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html">SemaphoreSlimContext</a>.<a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html#abeb1f086e2752f6f9a4d3d175a4392af">Lock</a>(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>, cancellationToken))</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> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Semaphore acquired for clone&quot;</span>);</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">if</span> (!await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#aeae08438da658a3c0afddbb7960e4faa">DirectoryExists</a>(repositoryPath, cancellationToken))</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">try</span></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> <span class="keyword">using </span>var cloneProgressReporter = progressReporter.<a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html#a32254a185da6e76e7fcd2d72a8032970">CreateSection</a>(<span class="keyword">null</span>, 0.75f);</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">using </span>var checkoutProgressReporter = progressReporter.<a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html#a32254a185da6e76e7fcd2d72a8032970">CreateSection</a>(<span class="keyword">null</span>, 0.25f);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> var cloneOptions = <span class="keyword">new</span> CloneOptions</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> {</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> RecurseSubmodules = recurseSubmodules,</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> OnCheckoutProgress = (path, completed, remaining) =&gt;</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> <span class="keywordflow">if</span> (checkoutProgressReporter == <span class="keyword">null</span>)</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> var percentage = (double)completed / remaining;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> checkoutProgressReporter.<a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html#ac736a80d9d56a20711468d9b8e27e3c1">ReportProgress</a>(percentage);</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> },</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> BranchName = initialBranch,</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> };</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> cloneOptions.FetchOptions.Hydrate(</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>,</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> cloneProgressReporter,</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_credentials_provider.html#a7f4eef18199d100a402911f095eaa933">GenerateCredentialsHandler</a>(</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory.html#ac68dccad767316b6c071ca0687bf3b9f">CreateGitRemoteFeatures</a>(url),</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> username,</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> password,</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> cancellationToken),</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> cancellationToken);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html#a0a6ed81450e50013e2ec1bae65e5f8cb">Clone</a>(</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> url,</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> cloneOptions,</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> repositoryPath,</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> cancellationToken);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> }</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">catch</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> {</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">try</span></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> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Deleting partially cloned repository...&quot;</span>);</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> <span class="comment">// DCT: Cancellation token is for job, operation must run regardless</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#ad3e0dda4b7fbad4c77f48ba3b2681dc7">DeleteDirectory</a>(repositoryPath, CancellationToken.None);</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> <span class="keywordflow">catch</span> (<a class="code hl_class" href="class_exception.html">Exception</a> innerException)</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> {</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogError(innerException, <span class="stringliteral">&quot;Error deleting partially cloned repository!&quot;</span>);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> }</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">throw</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> <span class="keywordflow">else</span></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> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogDebug(<span class="stringliteral">&quot;Repository exists, clone aborted!&quot;</span>);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">return</span> <span class="keyword">null</span>;</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> }</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> }</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">finally</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> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Semaphore released after clone&quot;</span>);</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">CloneInProgress</a> = <span class="keyword">false</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> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogInformation(<span class="stringliteral">&quot;Clone complete!&quot;</span>);</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">return</span> await <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a7240bff5e7feecd1e71018b1d6fab7bc">LoadRepository</a>(cancellationToken);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> }</div>
</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
<div class="foldopen" id="foldopen00216" data-start="{" data-end="}">
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a7240bff5e7feecd1e71018b1d6fab7bc"> 216</a></span> <span class="keyword">public</span> async ValueTask&lt;IRepository?&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a7240bff5e7feecd1e71018b1d6fab7bc">LoadRepository</a>(CancellationToken cancellationToken)</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> {</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Begin LoadRepository...&quot;</span>);</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> lock (<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>)</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">if</span> (<a class="code hl_property" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">CloneInProgress</a>)</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_exception.html">JobException</a>(<a class="code hl_enumeration" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#a1a6adb59dd51244efabf4e548e7075c8">ErrorCode</a>.RepoCloning);</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> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>.WaitAsync(cancellationToken);</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> {</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Semaphore acquired for load&quot;</span>);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> var libGit2Repo = await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html#aa2a092f96f2408453c2a1b5d5b0a4f30">CreateFromPath</a>(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#a18a442b5dff16f5e7a730ec354e81d78">ResolvePath</a>(), cancellationToken);</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> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository.html">Repository</a>(</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> libGit2Repo,</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">commands</a>,</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>,</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">eventConsumer</a>,</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>,</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">postWriteHandler</a>,</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">gitRemoteFeaturesFactory</a>,</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_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">repositoryFactory</a>,</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">generalConfigurationOptions</a>,</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">repositoryLogger</a>,</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> () =&gt;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> {</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Releasing semaphore due to Repository disposal...&quot;</span>);</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>.Release();</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> });</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> }</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keywordflow">catch</span></div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> {</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Releasing semaphore as load failed&quot;</span>);</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>.Release();</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordflow">throw</span>;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> }</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> }</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <span class="keywordflow">catch</span> (RepositoryNotFoundException e)</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> {</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(e, <span class="stringliteral">&quot;Repository not found!&quot;</span>);</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="keywordflow">return</span> <span class="keyword">null</span>;</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> }</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> }</div>
</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> </div>
<div class="foldopen" id="foldopen00263" data-start="{" data-end="}">
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a32cd2098a9c582391f7deeb6de5dcf35"> 263</a></span> <span class="keyword">public</span> async ValueTask <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a32cd2098a9c582391f7deeb6de5dcf35">DeleteRepository</a>(CancellationToken cancellationToken)</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> {</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogInformation(<span class="stringliteral">&quot;Deleting repository...&quot;</span>);</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> {</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="keyword">using</span> (await <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html">SemaphoreSlimContext</a>.<a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html#abeb1f086e2752f6f9a4d3d175a4392af">Lock</a>(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">semaphore</a>, cancellationToken))</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> {</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Semaphore acquired, deleting Repository directory...&quot;</span>);</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#ad3e0dda4b7fbad4c77f48ba3b2681dc7">DeleteDirectory</a>(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">ioManager</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#a18a442b5dff16f5e7a730ec354e81d78">ResolvePath</a>(), cancellationToken);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> }</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> }</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordflow">finally</span></div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> {</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">logger</a>.LogTrace(<span class="stringliteral">&quot;Semaphore released after delete attempt&quot;</span>);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> }</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> }</div>
</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> }</div>
</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</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_host_1_1_components_1_1_repository_1_1_repository_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository.html">Tgstation.Server.Host.Components.Repository.Repository</a></div><div class="ttdef"><b>Definition</b> <a href="_repository_8cs_source.html#l00026">Repository.cs:27</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html">Tgstation.Server.Host.Components.Repository.RepositoryManager</a></div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00021">RepositoryManager.cs:22</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a215c5b936673287ad252f01b1b87f9bf"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a215c5b936673287ad252f01b1b87f9bf">Tgstation.Server.Host.Components.Repository.RepositoryManager.repositoryLogger</a></div><div class="ttdeci">readonly ILogger&lt; Repository &gt; repositoryLogger</div><div class="ttdoc">The ILogger created Repositorys.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00067">RepositoryManager.cs:67</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a232da072229fb69ff3d42a08c13960e2"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a232da072229fb69ff3d42a08c13960e2">Tgstation.Server.Host.Components.Repository.RepositoryManager.RepositoryManager</a></div><div class="ttdeci">RepositoryManager(ILibGit2RepositoryFactory repositoryFactory, ILibGit2Commands commands, IIOManager ioManager, IEventConsumer eventConsumer, IPostWriteHandler postWriteHandler, IGitRemoteFeaturesFactory gitRemoteFeaturesFactory, IOptionsMonitor&lt; GeneralConfiguration &gt; generalConfigurationOptions, ILogger&lt; Repository &gt; repositoryLogger, ILogger&lt; RepositoryManager &gt; logger)</div><div class="ttdoc">Initializes a new instance of the RepositoryManager class.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00091">RepositoryManager.cs:91</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a32cd2098a9c582391f7deeb6de5dcf35"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a32cd2098a9c582391f7deeb6de5dcf35">Tgstation.Server.Host.Components.Repository.RepositoryManager.DeleteRepository</a></div><div class="ttdeci">async ValueTask DeleteRepository(CancellationToken cancellationToken)</div><div class="ttdoc">Delete the current repository.A ValueTask representing the running operation.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00263">RepositoryManager.cs:263</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a4f6156dc0a120ec2176d644f134b1129"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a4f6156dc0a120ec2176d644f134b1129">Tgstation.Server.Host.Components.Repository.RepositoryManager.repositoryFactory</a></div><div class="ttdeci">readonly ILibGit2RepositoryFactory repositoryFactory</div><div class="ttdoc">The ILibGit2RepositoryFactory for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00032">RepositoryManager.cs:32</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a550982dbdc2ce226e878702a520bbe27"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a550982dbdc2ce226e878702a520bbe27">Tgstation.Server.Host.Components.Repository.RepositoryManager.semaphore</a></div><div class="ttdeci">readonly SemaphoreSlim semaphore</div><div class="ttdoc">Used for controlling single access to the IRepository.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00077">RepositoryManager.cs:77</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a61b0a56eced0f9e75057c0c9f17b5d1d"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a61b0a56eced0f9e75057c0c9f17b5d1d">Tgstation.Server.Host.Components.Repository.RepositoryManager.Dispose</a></div><div class="ttdeci">void Dispose()</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00115">RepositoryManager.cs:115</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a7240bff5e7feecd1e71018b1d6fab7bc"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a7240bff5e7feecd1e71018b1d6fab7bc">Tgstation.Server.Host.Components.Repository.RepositoryManager.LoadRepository</a></div><div class="ttdeci">async ValueTask&lt; IRepository?&gt; LoadRepository(CancellationToken cancellationToken)</div><div class="ttdoc">Attempt to load the IRepository from the default location.A ValueTask&lt;TResult&gt; resulting in the loade...</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00216">RepositoryManager.cs:216</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a8216cd27859d7fffa1c3f2d22d76fc62"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8216cd27859d7fffa1c3f2d22d76fc62">Tgstation.Server.Host.Components.Repository.RepositoryManager.commands</a></div><div class="ttdeci">readonly ILibGit2Commands commands</div><div class="ttdoc">The ILibGit2Commands for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00037">RepositoryManager.cs:37</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a8603cad6d9df4a2079d3249becd0bbbb"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8603cad6d9df4a2079d3249becd0bbbb">Tgstation.Server.Host.Components.Repository.RepositoryManager.InUse</a></div><div class="ttdeci">bool InUse</div><div class="ttdoc">If something is holding a lock on the repository.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00024">RepositoryManager.cs:24</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a8b077fd0ad31eeed35d4fbe65f0606bd"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a8b077fd0ad31eeed35d4fbe65f0606bd">Tgstation.Server.Host.Components.Repository.RepositoryManager.postWriteHandler</a></div><div class="ttdeci">readonly IPostWriteHandler postWriteHandler</div><div class="ttdoc">The IPostWriteHandler for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00052">RepositoryManager.cs:52</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_a9f15336501147e21259e4a5a37bb4fdb"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#a9f15336501147e21259e4a5a37bb4fdb">Tgstation.Server.Host.Components.Repository.RepositoryManager.generalConfigurationOptions</a></div><div class="ttdeci">readonly IOptionsMonitor&lt; GeneralConfiguration &gt; generalConfigurationOptions</div><div class="ttdoc">The IOptionsMonitor&lt;TOptions&gt; of GeneralConfiguration for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00062">RepositoryManager.cs:62</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_aa62f89a29abc7febb886a1e7216067a2"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aa62f89a29abc7febb886a1e7216067a2">Tgstation.Server.Host.Components.Repository.RepositoryManager.ioManager</a></div><div class="ttdeci">readonly IIOManager ioManager</div><div class="ttdoc">The IIOManager for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00042">RepositoryManager.cs:42</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_aad9235dfb77b745164af1553b922573d"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#aad9235dfb77b745164af1553b922573d">Tgstation.Server.Host.Components.Repository.RepositoryManager.CloneRepository</a></div><div class="ttdeci">async ValueTask&lt; IRepository?&gt; CloneRepository(Uri url, string? initialBranch, string? username, string? password, JobProgressReporter progressReporter, bool recurseSubmodules, CancellationToken cancellationToken)</div><div class="ttdoc">Clone the repository at url .A ValueTask&lt;TResult&gt; resulting i the newly cloned IRepository,...</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00122">RepositoryManager.cs:122</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_ab48210b91ab8add64013a209d4223070"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ab48210b91ab8add64013a209d4223070">Tgstation.Server.Host.Components.Repository.RepositoryManager.logger</a></div><div class="ttdeci">readonly ILogger&lt; RepositoryManager &gt; logger</div><div class="ttdoc">The ILogger for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00072">RepositoryManager.cs:72</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_ad06470fddc597f80d4cef6b96c30b3e0"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ad06470fddc597f80d4cef6b96c30b3e0">Tgstation.Server.Host.Components.Repository.RepositoryManager.eventConsumer</a></div><div class="ttdeci">readonly IEventConsumer eventConsumer</div><div class="ttdoc">The IEventConsumer for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00047">RepositoryManager.cs:47</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_adb8787a8636ea92edd721e4e1eb7c97c"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#adb8787a8636ea92edd721e4e1eb7c97c">Tgstation.Server.Host.Components.Repository.RepositoryManager.CloneInProgress</a></div><div class="ttdeci">bool CloneInProgress</div><div class="ttdoc">If a CloneRepository(Uri, string, string, string, JobProgressReporter, bool, CancellationToken) opera...</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00027">RepositoryManager.cs:27</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager_html_ae04a12ae14b132a30dfb75ff2da4d3d3"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_repository_manager.html#ae04a12ae14b132a30dfb75ff2da4d3d3">Tgstation.Server.Host.Components.Repository.RepositoryManager.gitRemoteFeaturesFactory</a></div><div class="ttdeci">readonly IGitRemoteFeaturesFactory gitRemoteFeaturesFactory</div><div class="ttdoc">The IGitRemoteFeaturesFactory for the RepositoryManager.</div><div class="ttdef"><b>Definition</b> <a href="_repository_manager_8cs_source.html#l00057">RepositoryManager.cs:57</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_exception_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_exception.html">Tgstation.Server.Host.Jobs.JobException</a></div><div class="ttdoc">Operation exceptions thrown from the context of a Models.Job.</div><div class="ttdef"><b>Definition</b> <a href="_job_exception_8cs_source.html#l00010">JobException.cs:11</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html">Tgstation.Server.Host.Jobs.JobProgressReporter</a></div><div class="ttdoc">Progress reporter for a Job.</div><div class="ttdef"><b>Definition</b> <a href="_job_progress_reporter_8cs_source.html#l00013">JobProgressReporter.cs:14</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter_html_a32254a185da6e76e7fcd2d72a8032970"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html#a32254a185da6e76e7fcd2d72a8032970">Tgstation.Server.Host.Jobs.JobProgressReporter.CreateSection</a></div><div class="ttdeci">JobProgressReporter CreateSection(string? newStageName, double percentage)</div><div class="ttdoc">Create a subsection of the JobProgressReporter with its optional own stage name.</div><div class="ttdef"><b>Definition</b> <a href="_job_progress_reporter_8cs_source.html#l00176">JobProgressReporter.cs:176</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter_html_ac736a80d9d56a20711468d9b8e27e3c1"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_job_progress_reporter.html#ac736a80d9d56a20711468d9b8e27e3c1">Tgstation.Server.Host.Jobs.JobProgressReporter.ReportProgress</a></div><div class="ttdeci">void ReportProgress(double? progress)</div><div class="ttdoc">Report progress.</div><div class="ttdef"><b>Definition</b> <a href="_job_progress_reporter_8cs_source.html#l00137">JobProgressReporter.cs:137</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html">Tgstation.Server.Host.Utils.SemaphoreSlimContext</a></div><div class="ttdoc">Async lock context helper.</div><div class="ttdef"><b>Definition</b> <a href="_semaphore_slim_context_8cs_source.html#l00012">SemaphoreSlimContext.cs:13</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context_html_abeb1f086e2752f6f9a4d3d175a4392af"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html#abeb1f086e2752f6f9a4d3d175a4392af">Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock</a></div><div class="ttdeci">static async ValueTask&lt; SemaphoreSlimContext &gt; Lock(SemaphoreSlim semaphore, CancellationToken cancellationToken, ILogger? logger=null)</div><div class="ttdoc">Asyncronously locks a semaphore .</div><div class="ttdef"><b>Definition</b> <a href="_semaphore_slim_context_8cs_source.html#l00021">SemaphoreSlimContext.cs:21</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html">Tgstation.Server.Host.Components.Events.IEventConsumer</a></div><div class="ttdoc">Consumes EventTypes and takes the appropriate actions.</div><div class="ttdef"><b>Definition</b> <a href="_i_event_consumer_8cs_source.html#l00010">IEventConsumer.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_credentials_provider_html_a7f4eef18199d100a402911f095eaa933"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_credentials_provider.html#a7f4eef18199d100a402911f095eaa933">Tgstation.Server.Host.Components.Repository.ICredentialsProvider.GenerateCredentialsHandler</a></div><div class="ttdeci">ValueTask&lt; CredentialsHandler &gt; GenerateCredentialsHandler(IGitRemoteFeatures remoteFeatures, string? username, string? password, CancellationToken cancellationToken)</div><div class="ttdoc">Generate a CredentialsHandler from a given username and password .</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory.html">Tgstation.Server.Host.Components.Repository.IGitRemoteFeaturesFactory</a></div><div class="ttdoc">Factory for creating IGitRemoteFeatures.</div><div class="ttdef"><b>Definition</b> <a href="_i_git_remote_features_factory_8cs_source.html#l00010">IGitRemoteFeaturesFactory.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory_html_ac68dccad767316b6c071ca0687bf3b9f"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_git_remote_features_factory.html#ac68dccad767316b6c071ca0687bf3b9f">Tgstation.Server.Host.Components.Repository.IGitRemoteFeaturesFactory.CreateGitRemoteFeatures</a></div><div class="ttdeci">IGitRemoteFeatures CreateGitRemoteFeatures(IRepository repository)</div><div class="ttdoc">Create the IGitRemoteFeatures for a given repository .</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_commands_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_commands.html">Tgstation.Server.Host.Components.Repository.ILibGit2Commands</a></div><div class="ttdoc">For low level interactions with a LibGit2Sharp.IRepository.</div><div class="ttdef"><b>Definition</b> <a href="_i_lib_git2_commands_8cs_source.html#l00010">ILibGit2Commands.cs:11</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html">Tgstation.Server.Host.Components.Repository.ILibGit2RepositoryFactory</a></div><div class="ttdoc">Factory for creating LibGit2Sharp.IRepositorys.</div><div class="ttdef"><b>Definition</b> <a href="_i_lib_git2_repository_factory_8cs_source.html#l00012">ILibGit2RepositoryFactory.cs:13</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory_html_a0a6ed81450e50013e2ec1bae65e5f8cb"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html#a0a6ed81450e50013e2ec1bae65e5f8cb">Tgstation.Server.Host.Components.Repository.ILibGit2RepositoryFactory.Clone</a></div><div class="ttdeci">Task Clone(Uri url, CloneOptions cloneOptions, string path, CancellationToken cancellationToken)</div><div class="ttdoc">Clone a remote LibGit2Sharp.IRepository.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory_html_aa2a092f96f2408453c2a1b5d5b0a4f30"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_lib_git2_repository_factory.html#aa2a092f96f2408453c2a1b5d5b0a4f30">Tgstation.Server.Host.Components.Repository.ILibGit2RepositoryFactory.CreateFromPath</a></div><div class="ttdeci">ValueTask&lt; LibGit2Sharp.IRepository &gt; CreateFromPath(string path, CancellationToken cancellationToken)</div><div class="ttdoc">Load a LibGit2Sharp.IRepository from a given path .</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_repository_manager_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_1_1_i_repository_manager.html">Tgstation.Server.Host.Components.Repository.IRepositoryManager</a></div><div class="ttdoc">Factory for creating and loading IRepositorys.</div><div class="ttdef"><b>Definition</b> <a href="_i_repository_manager_8cs_source.html#l00012">IRepositoryManager.cs:13</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html">Tgstation.Server.Host.IO.IIOManager</a></div><div class="ttdoc">Interface for using filesystems.</div><div class="ttdef"><b>Definition</b> <a href="_i_i_o_manager_8cs_source.html#l00013">IIOManager.cs:14</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager_html_a18a442b5dff16f5e7a730ec354e81d78"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#a18a442b5dff16f5e7a730ec354e81d78">Tgstation.Server.Host.IO.IIOManager.ResolvePath</a></div><div class="ttdeci">string ResolvePath()</div><div class="ttdoc">Retrieve the full path of the current working directory.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager_html_ad3e0dda4b7fbad4c77f48ba3b2681dc7"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#ad3e0dda4b7fbad4c77f48ba3b2681dc7">Tgstation.Server.Host.IO.IIOManager.DeleteDirectory</a></div><div class="ttdeci">Task DeleteDirectory(string path, CancellationToken cancellationToken)</div><div class="ttdoc">Recursively delete a directory, removes and does not enter any symlinks encounterd.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager_html_aeae08438da658a3c0afddbb7960e4faa"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_i_o_manager.html#aeae08438da658a3c0afddbb7960e4faa">Tgstation.Server.Host.IO.IIOManager.DirectoryExists</a></div><div class="ttdeci">Task&lt; bool &gt; DirectoryExists(string path, CancellationToken cancellationToken)</div><div class="ttdoc">Check that the directory at path exists.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_post_write_handler_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_i_post_write_handler.html">Tgstation.Server.Host.IO.IPostWriteHandler</a></div><div class="ttdoc">Handles changing file modes/permissions after writing.</div><div class="ttdef"><b>Definition</b> <a href="_i_post_write_handler_8cs_source.html#l00006">IPostWriteHandler.cs:7</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html">Tgstation.Server.Api.Models</a></div><div class="ttdef"><b>Definition</b> <a href="_tgstation_8_server_8_api_2_models_2_chat_channel_8cs_source.html#l00005">ChatChannel.cs:6</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_html_a1a6adb59dd51244efabf4e548e7075c8"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#a1a6adb59dd51244efabf4e548e7075c8">Tgstation.Server.Api.Models.ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdoc">Types of Response.ErrorMessageResponses that the API may return.</div><div class="ttdef"><b>Definition</b> <a href="_error_code_8cs_source.html#l00011">ErrorCode.cs:12</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_events.html">Tgstation.Server.Host.Components.Events</a></div><div class="ttdef"><b>Definition</b> <a href="_event_consumer_8cs_source.html#l00009">EventConsumer.cs:10</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_components_1_1_repository.html">Tgstation.Server.Host.Components.Repository</a></div><div class="ttdef"><b>Definition</b> <a href="_default_git_remote_features_8cs_source.html#l00007">DefaultGitRemoteFeatures.cs:8</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_configuration_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_configuration.html">Tgstation.Server.Host.Configuration</a></div><div class="ttdef"><b>Definition</b> <a href="_control_panel_configuration_8cs_source.html#l00003">ControlPanelConfiguration.cs:4</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_extensions_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_extensions.html">Tgstation.Server.Host.Extensions</a></div><div class="ttdef"><b>Definition</b> <a href="_application_builder_extensions_8cs_source.html#l00021">ApplicationBuilderExtensions.cs:22</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_i_o_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_i_o.html">Tgstation.Server.Host.IO</a></div><div class="ttdef"><b>Definition</b> <a href="_buffered_file_stream_provider_8cs_source.html#l00008">BufferedFileStreamProvider.cs:9</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_jobs_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_jobs.html">Tgstation.Server.Host.Jobs</a></div><div class="ttdef"><b>Definition</b> <a href="_i_job_manager_8cs_source.html#l00007">IJobManager.cs:8</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_utils_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_utils.html">Tgstation.Server.Host.Utils</a></div><div class="ttdef"><b>Definition</b> <a href="_graph_q_l_git_lab_client_8cs_source.html#l00006">GraphQLGitLabClient.cs:7</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>