Skip to content

Instantly share code, notes, and snippets.

@philiplaureano
philiplaureano / Reflection.cs
Created May 22, 2017 23:59 — forked from TryJSIL/Reflection.cs
Reflection in JSIL
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
);
var testHarness = new TestHarness();
// The processors decide which methods should be replaced and how they should behave once the method is called
var consoleTestProcessor = new ConsoleTestProcessor();
testHarness.Processors.Add(consoleTestProcessor);
var fileSystemTestProcessor = new FileSystemTestProcessor();
fileSystemTestProcessor.AddMockFile(@"c:\foo.txt", "bar");
testHarness.Processors.Add(fileSystemTestProcessor);