static void Main(string[] args) { var postCompilerArgs = new PostCompilerArgs(args); var postCompiler = new SharpMock.Core.PostCompiler.PostCompiler(postCompilerArgs, new ConsoleLogger()); postCompiler.InterceptSpecifications(); postCompiler.InterceptAllStaticMethodCalls(); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
public PostCompiler(PostCompilerArgs postCompilerArgs, ILogger log) { this.log = log; if (postCompilerArgs.AreValid()) { var nameTable = new NameTable(); host = new PeReader.DefaultHost(nameTable); sharpMockCore = host.LoadUnitFrom( System.Reflection.Assembly.GetExecutingAssembly().Location ); sharpMockDelegateTypes = sharpMockCore as IAssembly; host.Errors += host_Errors; } this.postCompilerArgs = postCompilerArgs; #if DEBUG && LAUNCH_DEBUGGER System.Diagnostics.Debugger.Launch(); #endif }