Created
December 4, 2011 22:15
-
-
Save kg/1431465 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Program | |
public static void Main(string[] args) | |
{ | |
int i = 0; | |
while (i < args.Length) | |
{ | |
string text = args[i]; | |
string text2 = text; | |
if (text2 == null) | |
{ | |
goto IL_133; | |
} | |
if (<PrivateImplementationDetails>{96D5B0F9-A04A-4E1C-9689-4ECDD3840125}.$$method0x6000001-1 == null) | |
{ | |
Dictionary<string, int> expr_27 = new Dictionary<string, int>(8); | |
expr_27.Add("howdy", 0); | |
expr_27.Add("hello", 1); | |
expr_27.Add("world", 2); | |
expr_27.Add("what", 3); | |
expr_27.Add("why", 4); | |
expr_27.Add("who", 5); | |
expr_27.Add("where", 6); | |
expr_27.Add("when", 7); | |
<PrivateImplementationDetails>{96D5B0F9-A04A-4E1C-9689-4ECDD3840125}.$$method0x6000001-1 = expr_27; | |
} | |
int num; | |
if (!<PrivateImplementationDetails>{96D5B0F9-A04A-4E1C-9689-4ECDD3840125}.$$method0x6000001-1.TryGetValue(text2, out num)) | |
{ | |
goto IL_133; | |
} | |
switch (num) | |
{ | |
case 0: | |
{ | |
Console.WriteLine("0"); | |
break; | |
} | |
case 1: | |
{ | |
Console.WriteLine("1"); | |
break; | |
} | |
case 2: | |
{ | |
Console.WriteLine("2"); | |
break; | |
} | |
case 3: | |
{ | |
Console.WriteLine("3"); | |
break; | |
} | |
case 4: | |
{ | |
Console.WriteLine("4"); | |
break; | |
} | |
case 5: | |
{ | |
Console.WriteLine("5"); | |
break; | |
} | |
case 6: | |
{ | |
Console.WriteLine("6"); | |
break; | |
} | |
case 7: | |
{ | |
Console.WriteLine("7"); | |
break; | |
} | |
default: | |
{ | |
goto IL_133; | |
} | |
} | |
IL_140: | |
i++; | |
continue; | |
IL_133: | |
Console.WriteLine("default"); | |
goto IL_140; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSIL.MakeStaticClass("Program", true, [], function ($) { | |
$.Main = function (args) { | |
var num = 0; | |
__loop0__: | |
for (var i = 0; i < args.length; ++i) { | |
var arg = args[i]; | |
switch (num) { | |
case 0: | |
break; | |
case 1: | |
break; | |
case 2: | |
break; | |
case 3: | |
break; | |
case 4: | |
break; | |
case 5: | |
break; | |
case 6: | |
break; | |
case 7: | |
break; | |
default: | |
$asm02.System.Console.WriteLine("default"); | |
break; | |
} | |
} | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment