Files
tgstation-server/_cached_response_stream_8cs_source.html

199 lines
32 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.Common/Http/CachedResponseStream.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_c79986b3cf736cf12ec68449cf9642ff.html">Tgstation.Server.Common</a></li><li class="navelem"><a class="el" href="dir_1ff23923a0eb1a1573881c7fcd0b2d08.html">Http</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">CachedResponseStream.cs</div></div>
</div><!--header-->
<div class="contents">
<a href="_cached_response_stream_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.IO;</div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">using </span>System.Net.Http;</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="foldopen" id="foldopen00006" data-start="{" data-end="}">
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="namespace_tgstation_1_1_server_1_1_common_1_1_http.html"> 6</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_common_1_1_http.html">Tgstation.Server.Common.Http</a></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span>{</div>
<div class="foldopen" id="foldopen00011" data-start="{" data-end="};">
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html"> 11</a></span> <span class="keyword">public</span> <span class="keyword">sealed</span> <span class="keyword">class </span><a class="code hl_class" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html">CachedResponseStream</a> : <a class="code hl_class" href="class_stream.html">Stream</a></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> {</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da"> 16</a></span> readonly HttpContent <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da">responseContent</a>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56"> 21</a></span> readonly <a class="code hl_class" href="class_stream.html">Stream</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="}">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1c106673ce3f96456822b62e75b06774"> 28</a></span> <span class="keyword">public</span> <span class="keyword">static</span> async ValueTask&lt;CachedResponseStream&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1c106673ce3f96456822b62e75b06774">Create</a>(HttpResponseMessage response)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">if</span> (response == <span class="keyword">null</span>)</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(response));</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using</span> (response)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> var content = response.Content;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> response.Content = <span class="keyword">null</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// don&#39;t cry about the missing CancellationToken overload: https://github.com/dotnet/corefx/issues/32615#issuecomment-562083237</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> var <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a> = await content.ReadAsStreamAsync().ConfigureAwait(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html">CachedResponseStream</a>(content, <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">catch</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> content.Dispose();</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">throw</span>;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</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_common_1_1_http_1_1_cached_response_stream.html#a5bc24fa5b91f01b55db69e0f8e4992b9"> 52</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">bool</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a5bc24fa5b91f01b55db69e0f8e4992b9">CanRead</a> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.CanRead;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#ad5450cdb80037c665efa7ad954750f12"> 55</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">bool</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#ad5450cdb80037c665efa7ad954750f12">CanSeek</a> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.CanSeek;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#af5cf1107e44affbb9b21168fdf04d7b6"> 58</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">bool</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#af5cf1107e44affbb9b21168fdf04d7b6">CanWrite</a> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.CanWrite;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1108ac81d05edfc40730386ea1de23b7"> 61</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">long</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1108ac81d05edfc40730386ea1de23b7">Length</a> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Length;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="foldopen" id="foldopen00064" data-start="{" data-end="};">
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a090f158208f91f1bd5973919f8fea1f6"> 64</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">long</span> <a class="code hl_property" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a090f158208f91f1bd5973919f8fea1f6">Position</a></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">get</span> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Position;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">set</span> =&gt; responseStream.Position = value;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aaf3b600ef71c9550ed43c8e555be2393"> 71</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aaf3b600ef71c9550ed43c8e555be2393">Flush</a>() =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Flush();</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1a2d70021fe77b2b88babb8d3a263eff"> 74</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1a2d70021fe77b2b88babb8d3a263eff">Read</a>(<span class="keywordtype">byte</span>[] buffer, <span class="keywordtype">int</span> offset, <span class="keywordtype">int</span> count) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Read(buffer, offset, count);</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</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_common_1_1_http_1_1_cached_response_stream.html#ab7fd58cd9ec7f8196f43bcb24c1418e2"> 77</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">long</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#ab7fd58cd9ec7f8196f43bcb24c1418e2">Seek</a>(<span class="keywordtype">long</span> offset, SeekOrigin origin) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Seek(offset, origin);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a4532558d18033ec9ff772d99b5f25064"> 80</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a4532558d18033ec9ff772d99b5f25064">SetLength</a>(<span class="keywordtype">long</span> value) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.SetLength(value);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a2ea4a876efaafc7c7b00a9abac0ccaa9"> 83</a></span> <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a2ea4a876efaafc7c7b00a9abac0ccaa9">Write</a>(<span class="keywordtype">byte</span>[] buffer, <span class="keywordtype">int</span> offset, <span class="keywordtype">int</span> count) =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Write(buffer, offset, count);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a19c93b6b214a64529d9c7bf61ed28a2d"> 86</a></span> <span class="keyword">protected</span> <span class="keyword">override</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a19c93b6b214a64529d9c7bf61ed28a2d">Dispose</a>(<span class="keywordtype">bool</span> disposing)</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> base.Dispose(disposing);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">if</span> (!disposing)</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da">responseContent</a>.Dispose();</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>.Dispose();</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="foldopen" id="foldopen00101" data-start="{" data-end="}">
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aa92a3573c985c8bbded9616a033472f0"> 101</a></span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aa92a3573c985c8bbded9616a033472f0">CachedResponseStream</a>(HttpContent <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da">responseContent</a>, <a class="code hl_class" href="class_stream.html">Stream</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>)</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> this.responseContent = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da">responseContent</a>;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> this.responseStream = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">responseStream</a>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>}</div>
</div>
<div class="ttc" id="aclass_stream_html"><div class="ttname"><a href="class_stream.html">Stream</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html">Tgstation.Server.Common.Http.CachedResponseStream</a></div><div class="ttdoc">Caches the Stream from a HttpResponseMessage for later use.</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00011">CachedResponseStream.cs:12</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a090f158208f91f1bd5973919f8fea1f6"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a090f158208f91f1bd5973919f8fea1f6">Tgstation.Server.Common.Http.CachedResponseStream.Position</a></div><div class="ttdeci">override long Position</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00064">CachedResponseStream.cs:65</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a1108ac81d05edfc40730386ea1de23b7"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1108ac81d05edfc40730386ea1de23b7">Tgstation.Server.Common.Http.CachedResponseStream.Length</a></div><div class="ttdeci">override long Length</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00061">CachedResponseStream.cs:61</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a19c93b6b214a64529d9c7bf61ed28a2d"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a19c93b6b214a64529d9c7bf61ed28a2d">Tgstation.Server.Common.Http.CachedResponseStream.Dispose</a></div><div class="ttdeci">override void Dispose(bool disposing)</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00086">CachedResponseStream.cs:86</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a1a2d70021fe77b2b88babb8d3a263eff"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1a2d70021fe77b2b88babb8d3a263eff">Tgstation.Server.Common.Http.CachedResponseStream.Read</a></div><div class="ttdeci">override int Read(byte[] buffer, int offset, int count)</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a1c106673ce3f96456822b62e75b06774"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a1c106673ce3f96456822b62e75b06774">Tgstation.Server.Common.Http.CachedResponseStream.Create</a></div><div class="ttdeci">static async ValueTask&lt; CachedResponseStream &gt; Create(HttpResponseMessage response)</div><div class="ttdoc">Asyncronously creates a new CachedResponseStream.</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00028">CachedResponseStream.cs:28</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a2ea4a876efaafc7c7b00a9abac0ccaa9"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a2ea4a876efaafc7c7b00a9abac0ccaa9">Tgstation.Server.Common.Http.CachedResponseStream.Write</a></div><div class="ttdeci">override void Write(byte[] buffer, int offset, int count)</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a4532558d18033ec9ff772d99b5f25064"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a4532558d18033ec9ff772d99b5f25064">Tgstation.Server.Common.Http.CachedResponseStream.SetLength</a></div><div class="ttdeci">override void SetLength(long value)</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a5bc24fa5b91f01b55db69e0f8e4992b9"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a5bc24fa5b91f01b55db69e0f8e4992b9">Tgstation.Server.Common.Http.CachedResponseStream.CanRead</a></div><div class="ttdeci">override bool CanRead</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00052">CachedResponseStream.cs:52</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a88d32d0af86ee5028b9c90e51761b0da"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a88d32d0af86ee5028b9c90e51761b0da">Tgstation.Server.Common.Http.CachedResponseStream.responseContent</a></div><div class="ttdeci">readonly HttpContent responseContent</div><div class="ttdoc">The HttpContent for the CachedResponseStream.</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00016">CachedResponseStream.cs:16</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_a9abc138148342dd9de5abd0bbff88a56"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#a9abc138148342dd9de5abd0bbff88a56">Tgstation.Server.Common.Http.CachedResponseStream.responseStream</a></div><div class="ttdeci">readonly Stream responseStream</div><div class="ttdoc">The reponse content Stream.</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00021">CachedResponseStream.cs:21</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_aa92a3573c985c8bbded9616a033472f0"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aa92a3573c985c8bbded9616a033472f0">Tgstation.Server.Common.Http.CachedResponseStream.CachedResponseStream</a></div><div class="ttdeci">CachedResponseStream(HttpContent responseContent, Stream responseStream)</div><div class="ttdoc">Initializes a new instance of the CachedResponseStream class.</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00101">CachedResponseStream.cs:101</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_aaf3b600ef71c9550ed43c8e555be2393"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#aaf3b600ef71c9550ed43c8e555be2393">Tgstation.Server.Common.Http.CachedResponseStream.Flush</a></div><div class="ttdeci">override void Flush()</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_ab7fd58cd9ec7f8196f43bcb24c1418e2"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#ab7fd58cd9ec7f8196f43bcb24c1418e2">Tgstation.Server.Common.Http.CachedResponseStream.Seek</a></div><div class="ttdeci">override long Seek(long offset, SeekOrigin origin)</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_ad5450cdb80037c665efa7ad954750f12"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#ad5450cdb80037c665efa7ad954750f12">Tgstation.Server.Common.Http.CachedResponseStream.CanSeek</a></div><div class="ttdeci">override bool CanSeek</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00055">CachedResponseStream.cs:55</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream_html_af5cf1107e44affbb9b21168fdf04d7b6"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_common_1_1_http_1_1_cached_response_stream.html#af5cf1107e44affbb9b21168fdf04d7b6">Tgstation.Server.Common.Http.CachedResponseStream.CanWrite</a></div><div class="ttdeci">override bool CanWrite</div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00058">CachedResponseStream.cs:58</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_common_1_1_http_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_common_1_1_http.html">Tgstation.Server.Common.Http</a></div><div class="ttdef"><b>Definition</b> <a href="_cached_response_stream_8cs_source.html#l00006">CachedResponseStream.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>