<ItemGroup>
<Compile Include="CountAttribute.cs" />
<Compile Include="GeneratedVariableIdentifier.cs" />
+ <Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
using System.Collections.Generic;
using System.IO;
using System.Linq;
-
+using CommandLine;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
// with the s IL instructions.
internal class Program
{
+ private static readonly Options Options = new Options();
+
private static void Main(string[] args)
{
- if (args.Length == 0)
+ if (!Parser.Default.ParseArguments(args, Options))
{
- Console.WriteLine("Usage: rewrite [file.dll] [file.snk] [options]");
- Console.WriteLine("[options] is:");
- Console.WriteLine(" -debug (enable calls to GL.GetError())");
- Console.WriteLine(" -dllimport (force calls to use DllImport instead of GetProcAddress)");
return;
}