static void Main(string[] args) { if (args == null) return; var injector = new ThrowHelperIilInjector(args[0]); injector.Inject(); injector.Save(); }
public void Must_Save_File() { var myAssembly = Assembly.GetExecutingAssembly(); var path = myAssembly.CodeBase.Remove(0, 8); var fileInfo = new FileInfo(path); outputPath = string.Format("{0}/TempFile.dll", fileInfo.Directory.FullName); var ilInjector = new ThrowHelperIilInjector(path, outputPath); ilInjector.LoadAssemblyAndGetMethods(); ilInjector.Inject(); ilInjector.Save(); File.Exists(outputPath).Should().Be.True(); }