diff --git a/.gitignore b/.gitignore index ad865f3..00354db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vscode/ *.o cpp/bin/* cpp/lib/* diff --git a/.gitmodules b/.gitmodules index b8d0c54..21e006b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ path = python url = https://github.com/rhempel/ev3dev-lang-python branch = master +[submodule "csharp"] + path = csharp + url = https://github.com/pgrudzien12/ev3dev-lang-csharp diff --git a/README.md b/README.md index f61129e..457c248 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,6 @@ We currently have libraries for the following languages here: - Lua - Node.JS - Python +- .NET (C#) Each binding complies with our universal language binding specification, which also serves as high-level documentation for our wrappers. diff --git a/autogen/autogen-list.json b/autogen/autogen-list.json index 373f7dd..c74aa7d 100644 --- a/autogen/autogen-list.json +++ b/autogen/autogen-list.json @@ -8,6 +8,16 @@ ], "templateDir": "cpp/templates/" }, + "csharp": { + "files": [ + "csharp/src/ev3dev/Drivers.cs", + "csharp/src/ev3dev/ev3dev.MotorCommands.cs", + "csharp/src/ev3dev/ev3dev.InfraredSensorModes.cs", + "csharp/src/ev3dev/ev3dev.SystemProperties.cs", + "csharp/src/ev3dev/ev3dev.PropertyValues.cs" + ], + "templateDir": "csharp/templates/" + }, "python": { "files": [ "python/ev3dev/core.py", diff --git a/autogen/config.js b/autogen/config.js index cd08fb0..d6f7f00 100644 --- a/autogen/config.js +++ b/autogen/config.js @@ -5,6 +5,7 @@ var cStyleAutogenEnd = "//~autogen"; exports.autogenFenceComments = { '.ts': { start: cStyleAutogenStart, end: cStyleAutogenEnd }, + '.cs': { start: cStyleAutogenStart, end: cStyleAutogenEnd }, '.vala': { start: cStyleAutogenStart, end: cStyleAutogenEnd }, '.cpp': { start: cStyleAutogenStart, end: cStyleAutogenEnd }, '.h': { start: cStyleAutogenStart, end: cStyleAutogenEnd }, @@ -23,7 +24,9 @@ exports.extraLiquidFilters = { }); } - if(typeof input == 'string') + if(!input) + return "undefined"; + else if(typeof input == 'string') return camelCaseSingle(input); else return input.map(camelCaseSingle); diff --git a/csharp b/csharp new file mode 160000 index 0000000..f89c68d --- /dev/null +++ b/csharp @@ -0,0 +1 @@ +Subproject commit f89c68d63c0a943c08c88966b9ef7d4c519e294c