From 21161df2326b2a56d8e3513ed7e5c16768e80113 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Fri, 8 Dec 2023 10:42:45 +0100 Subject: [PATCH] fix: enable generic support --- MathLib/Math.cs | 15 ++++++++++++++- template.beyondnetgen.android.config.json | 1 + template.beyondnetgen.ios.config.json | 5 +++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/MathLib/Math.cs b/MathLib/Math.cs index 98984eb..b5781bd 100644 --- a/MathLib/Math.cs +++ b/MathLib/Math.cs @@ -2,6 +2,14 @@ public class Math { + static public float Reccursive(float n) { + return Reccursive(n, 1); + } + + static private float Reccursive(float n, float i) { + return n; + } + public float Substract(float a, float b) { return a - b; @@ -12,7 +20,7 @@ public class Math return a * b; } - public float Devide(float a, float b) + public float Divide(float a, float b) { return a / b; } @@ -26,4 +34,9 @@ public class Math { return a + b; } + + public List Iterate(float a, float b) + { + return [a, b]; + } } diff --git a/template.beyondnetgen.android.config.json b/template.beyondnetgen.android.config.json index 02fdf44..250c860 100644 --- a/template.beyondnetgen.android.config.json +++ b/template.beyondnetgen.android.config.json @@ -2,6 +2,7 @@ "AssemblyPath": "INPUT_PROJECT_NAME/bin/Release/INPUT_NET_SPEC/INPUT_PROJECT_NAME.dll", "CSharpUnmanagedOutputPath": "GENERATED_PROJECT_NAME/Generated.cs", "COutputPath": "GENERATED_PROJECT_NAME/Generated.h", + "EnableGenericsSupport": true, "ExcludedTypeNames": [ "System.GC", "System.Reflection.MemberInfo", diff --git a/template.beyondnetgen.ios.config.json b/template.beyondnetgen.ios.config.json index 0f2b92e..c7aedbc 100644 --- a/template.beyondnetgen.ios.config.json +++ b/template.beyondnetgen.ios.config.json @@ -1,5 +1,6 @@ { "AssemblyPath": "INPUT_PROJECT_NAME/bin/Release/INPUT_NET_SPEC/INPUT_PROJECT_NAME.dll", "CSharpUnmanagedOutputPath": "GENERATED_PROJECT_NAME/Generated.cs", - "COutputPath": "GENERATED_PROJECT_NAME/Generated.h" -} \ No newline at end of file + "COutputPath": "GENERATED_PROJECT_NAME/Generated.h", + "EnableGenericsSupport": true +}