Skip to content

Commit

Permalink
Merge pull request #194 from smacker/add_csharp_example
Browse files Browse the repository at this point in the history
add csharp example
  • Loading branch information
smacker authored Feb 5, 2019
2 parents 3abf92d + 65bf45f commit ea9082d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 21 deletions.
42 changes: 21 additions & 21 deletions server/asset/asset.go

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/examples/csharp.cs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const csharp_example_1 = `// A Hello World! program in C#.
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}`;
7 changes: 7 additions & 0 deletions src/state/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { php_example_2 } from '../examples/phpv7.php.js';
import { javascript_example_1 } from '../examples/javascript.js.js';
import { ruby_example_1 } from '../examples/ruby.rb.js';
import { bash_example_1 } from '../examples/bash.sh.js';
import { csharp_example_1 } from '../examples/csharp.cs.js';

export const DEFAULT_EXAMPLE = 'java_example_1';
const LANG_JAVA = 'java';
Expand All @@ -21,6 +22,7 @@ const LANG_PHP = 'php';
const LANG_JS = 'javascript';
const LANG_RUBY = 'ruby';
const LANG_BASH = 'bash';
const LANG_CSHARP = 'csharp';

const examples = {
java_example_1: {
Expand Down Expand Up @@ -74,6 +76,11 @@ const examples = {
code: bash_example_1,
driver: LANG_BASH,
},
csharp_example_1: {
name: 'csharp.cs',
language: LANG_CSHARP,
code: csharp_example_1,
},
};

export const initialState = {
Expand Down

0 comments on commit ea9082d

Please sign in to comment.