private static void ResolveReference(string dir, string name, ICollection <string> list) { const StringComparison cmptype = StringComparison.InvariantCultureIgnoreCase; if (name.EndsWith(".abc", cmptype)) { var rs = typeof(QA).GetResourceStream(name); if (rs == null) { throw new InvalidOperationException(); } string path = Path.Combine(dir, name); rs.Save(path); string dll = Path.ChangeExtension(name, ".dll"); WrapperGenerator.Generate(path, dll, null); list.Add(dll); } else { throw new InvalidOperationException(String.Format("Unable to resolve ref: {0}", name)); } }
static void Main(string[] args) { if (args.Count() < 2) { Console.WriteLine("C# to C++ Generator. Copyright Mark Chandler 2012"); Console.WriteLine("Usage:"); Console.WriteLine("\tCSharpToCppGenerator.exe [Assembly] [OutDir]"); return; } WrapperGenerator gen = new WrapperGenerator(args[1], args[0]); foreach (var type in gen.GetTypesWith <ExposeToCppAttribute>()) { gen.Generate(type); } gen.GenerateCombinedFile(); }