// ReSharper disable once UnusedMember.Local // ReSharper disable once SuggestBaseTypeForParameter private static void Main(string[] args) { var arguments = ValidateArguments(args); if (arguments.IsValid) { var context = new PatchContext(arguments.CoreExecutableName); context.LoadInjectors(new[] { new SampleCoreInjector() }); context.RunInjectors(); context.Run(); Console.WriteLine($"Finished running .NET Core injection sample.{Environment.NewLine}Press Any key to continue"); Console.ReadKey(true); context = new PatchContext(arguments.FrameworkExecutableName); context.LoadInjectors(new[] { new SampleFrameworkInjector() }); context.RunInjectors(); context.Run(); Console.WriteLine("Finished running .NET Framework injection sample."); } Console.WriteLine("Press any key to quit"); Console.ReadKey(true); }