Skip to content

Instantly share code, notes, and snippets.

View kg's full-sized avatar

Katelyn Gadd kg

View GitHub Profile
@kg
kg / gist:2476895
Created April 24, 2012 05:49
augh
public override IEnumerable<JSNode> Children {
get {
foreach (var child in AnnotatedChildren)
yield return child.Node;
}
}
public virtual IEnumerable<AnnotatedNode> AnnotatedChildren {
get {
foreach (var child in base.Children)
@kg
kg / file1.cs
Created April 28, 2012 07:31
Test Gist
using System;
using JSIL;
using JSIL.Meta;
public static class Program {
public static int x = 10;
public static int y = 20;
public static void Main () {
dynamic document = Builtins.Global["document"];
@kg
kg / file1.cs
Created April 28, 2012 07:47
My Gist
using System;
using JSIL;
using JSIL.Meta;
public static class Program {
public static int x = 10;
public static int y = 20;
public static void Main () {
dynamic document = Builtins.Global["document"];
@kg
kg / file1.cs
Created April 28, 2012 07:50
My Gist 2 v2
using System;
using JSIL;
using JSIL.Meta; // hello
public static class Program {
public static int x = 10;
public static int y = 20;
public static void Main () {
dynamic document = Builtins.Global["document"];
@kg
kg / file1.cs
Created April 28, 2012 08:03
Reflection v3
// Hello!
using System;
using System.Reflection;
using System.Collections.Generic;
public static class Program {
public static void Main (string[] args) {
Common.Util.ListMembers<MethodInfo>(
typeof(T),
@kg
kg / Reflection.cs
Created April 28, 2012 09:30 — forked from TryJSIL/Reflection.cs
Reflection
using System;
using System.Reflection;
using System.Collections.Generic;
public static class Program {
public static void Main (string[] args) {
Common.Util.ListMembers<MethodInfo>(
typeof(T),
BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.Public
);
@kg
kg / Interfaces.cs
Created April 28, 2012 09:33 — forked from TryJSIL/Interfaces.cs
Interfaces
using System;
public interface I {
void Foo ();
}
public class A : I {
public void Foo () {
Console.WriteLine("A");
}
@kg
kg / Interfaces.cs
Created April 28, 2012 09:34 — forked from TryJSIL/Interfaces.cs
Interfaces
using System;
public interface I {
void Foo ();
}
public class A : I {
public void Foo () {
Console.WriteLine("A");
}
@kg
kg / BinaryTrees.cs
Created April 28, 2012 09:34 — forked from TryJSIL/BinaryTrees.cs
Tree Benchmark v2
/* The Computer Language Benchmarks Game
http://shootout.alioth.debian.org/
contributed by Marek Safar
*/
using System;
public static class Program {
const int minDepth = 4;
@kg
kg / file1.cs
Created April 28, 2012 09:35 — forked from TryJSIL/Enums.cs
Enums v2
using System; // Hello
public static class Program {
public enum SimpleEnum {
A,
B = 3,
C,
D = 10
}