0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-18 02:32:33 +00:00

C# usage example. Fixes

This commit is contained in:
Pēteris Caune 2018-08-20 12:39:57 +03:00
parent 1a5478dee9
commit fdbe733df3
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2
8 changed files with 28 additions and 0 deletions

View file

@ -6,3 +6,4 @@ All notable changes to this project will be documented in this file.
### Improvements
- A new "Check Details" page.
- Updated django-compressor, psycopg2, pytz, requests package versions.
- C# usage example.

View file

@ -31,6 +31,7 @@ class Command(BaseCommand):
_process("bash_wget", lexers.BashLexer())
_process("browser", lexers.JavascriptLexer())
_process("crontab", lexers.BashLexer())
_process("cs", lexers.CSharpLexer())
_process("node", lexers.JavascriptLexer())
_process("python_urllib2", lexers.PythonLexer())
_process("python_requests", lexers.PythonLexer())

View file

@ -14,6 +14,7 @@
<li><a href="{% url 'hc-docs' %}#ruby">Ruby</a></li>
<li><a href="{% url 'hc-docs' %}#node">Node</a></li>
<li><a href="{% url 'hc-docs' %}#php">PHP</a></li>
<li><a href="{% url 'hc-docs' %}#cs">C#</a></li>
<li><a href="{% url 'hc-docs' %}#browser">Browser</a></li>
<li><a href="{% url 'hc-docs' %}#powershell">PowerShell</a></li>
<li><a href="{% url 'hc-docs' %}#email">Email</a></li>

View file

@ -169,6 +169,10 @@ thing: they fire off a HTTP GET method.</p>
<h3>PHP</h3>
{% include "front/snippets/php.html" %}
<a name="cs"></a>
<h3>C#</h3>
{% include "front/snippets/cs.html" %}
<a name="browser"></a>
<h3>Browser</h3>
<p>

View file

@ -23,6 +23,9 @@
<li class="hidden-xs">
<a href="#php" data-toggle="tab">PHP</a>
</li>
<li class="hidden-xs">
<a href="#cs" data-toggle="tab">C#</a>
</li>
<li class="hidden-xs">
<a href="#browser" data-toggle="tab">Browser</a>
</li>
@ -57,6 +60,9 @@
<div role="tabpanel" class="tab-pane" id="php">
{% include "front/snippets/php.html" %}
</div>
<div role="tabpanel" class="tab-pane" id="cs">
{% include "front/snippets/cs.html" %}
</div>
<div class="tab-pane" id="browser">
{% include "front/snippets/browser.html" %}
</div>

View file

@ -0,0 +1,5 @@
<div class="highlight"><pre><span></span><span class="k">using</span> <span class="p">(</span><span class="kt">var</span> <span class="n">client</span> <span class="p">=</span> <span class="k">new</span> <span class="n">System</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">WebClient</span><span class="p">())</span>
<span class="p">{</span>
<span class="n">client</span><span class="p">.</span><span class="n">DownloadString</span><span class="p">(</span><span class="s">&quot;{{ ping_url }}&quot;</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>

View file

@ -0,0 +1,4 @@
using (var client = new System.Net.WebClient())
{
client.DownloadString("PING_URL");
}

View file

@ -65,6 +65,9 @@
<li class="hidden-xs">
<a href="#php" data-toggle="tab">PHP</a>
</li>
<li class="hidden-xs">
<a href="#cs" data-toggle="tab">C#</a>
</li>
<li class="hidden-xs">
<a href="#browser" data-toggle="tab">Browser</a>
</li>
@ -96,6 +99,9 @@
<div role="tabpanel" class="tab-pane" id="php">
{% include "front/snippets/php.html" %}
</div>
<div role="tabpanel" class="tab-pane" id="cs">
{% include "front/snippets/cs.html" %}
</div>
<div class="tab-pane" id="browser">
{% include "front/snippets/browser.html" %}
</div>