diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a36ee6d..0d76ee2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. \ No newline at end of file diff --git a/hc/front/management/commands/pygmentize.py b/hc/front/management/commands/pygmentize.py index 44ce0356..b05077c7 100644 --- a/hc/front/management/commands/pygmentize.py +++ b/hc/front/management/commands/pygmentize.py @@ -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()) diff --git a/templates/front/base_docs.html b/templates/front/base_docs.html index a38f1a18..44187b53 100644 --- a/templates/front/base_docs.html +++ b/templates/front/base_docs.html @@ -14,6 +14,7 @@
  • Ruby
  • Node
  • PHP
  • +
  • C#
  • Browser
  • PowerShell
  • Email
  • diff --git a/templates/front/docs.html b/templates/front/docs.html index efd10454..98bba35b 100644 --- a/templates/front/docs.html +++ b/templates/front/docs.html @@ -169,6 +169,10 @@ thing: they fire off a HTTP GET method.

    PHP

    {% include "front/snippets/php.html" %} + +

    C#

    +{% include "front/snippets/cs.html" %} +

    Browser

    diff --git a/templates/front/show_usage_modal.html b/templates/front/show_usage_modal.html index 8ff46bbb..ce4cf955 100644 --- a/templates/front/show_usage_modal.html +++ b/templates/front/show_usage_modal.html @@ -23,6 +23,9 @@

    + @@ -57,6 +60,9 @@
    {% include "front/snippets/php.html" %}
    +
    + {% include "front/snippets/cs.html" %} +
    {% include "front/snippets/browser.html" %}
    diff --git a/templates/front/snippets/cs.html b/templates/front/snippets/cs.html new file mode 100644 index 00000000..a33d08c6 --- /dev/null +++ b/templates/front/snippets/cs.html @@ -0,0 +1,5 @@ +
    using (var client = new System.Net.WebClient())
    +{
    +       client.DownloadString("{{ ping_url }}");
    +}
    +
    diff --git a/templates/front/snippets/cs.txt b/templates/front/snippets/cs.txt new file mode 100644 index 00000000..dc862693 --- /dev/null +++ b/templates/front/snippets/cs.txt @@ -0,0 +1,4 @@ +using (var client = new System.Net.WebClient()) +{ + client.DownloadString("PING_URL"); +} \ No newline at end of file diff --git a/templates/front/welcome.html b/templates/front/welcome.html index f8fa3c28..072124bf 100644 --- a/templates/front/welcome.html +++ b/templates/front/welcome.html @@ -65,6 +65,9 @@ + @@ -96,6 +99,9 @@
    {% include "front/snippets/php.html" %}
    +
    + {% include "front/snippets/cs.html" %} +
    {% include "front/snippets/browser.html" %}