-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBind.cs
executable file
·34 lines (31 loc) · 850 Bytes
/
Bind.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Xml.Serialization;
using System.Collections.Specialized;
namespace CSToCppXMLBinder
{
class Bind
{
static void Main(string[] args)
{
if (args.Length != 4)
{
Console.Error.WriteLine("Command line should be:\n\t\tBind.exe [NameSpace] [Assembly] [output]\n\nEx: Bind PSiXML.Common Bindings.netmodule mappings.ini");
return;
}
try
{
string xml_support_dir = args[3];
Assembly asm = Assembly.LoadFrom(Environment.CurrentDirectory+"\\"+args[1]);
CppBinder.BindAssembly(args[2], args[0], asm, xml_support_dir);
Console.WriteLine("Success!");
}
catch (Exception e)
{
Console.Error.WriteLine(e.ToString());
}
}
}
}