mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-18 02:32:33 +00:00
C# usage example. Fixes #127
This commit is contained in:
parent
1a5478dee9
commit
fdbe733df3
8 changed files with 28 additions and 0 deletions
|
@ -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.
|
|
@ -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())
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
5
templates/front/snippets/cs.html
Normal file
5
templates/front/snippets/cs.html
Normal 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">"{{ ping_url }}"</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
4
templates/front/snippets/cs.txt
Normal file
4
templates/front/snippets/cs.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
using (var client = new System.Net.WebClient())
|
||||
{
|
||||
client.DownloadString("PING_URL");
|
||||
}
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue