diff options
Diffstat (limited to 'tests/src/Simple/StaticLibrary/StaticLibrary.cs')
-rw-r--r-- | tests/src/Simple/StaticLibrary/StaticLibrary.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/src/Simple/StaticLibrary/StaticLibrary.cs b/tests/src/Simple/StaticLibrary/StaticLibrary.cs new file mode 100644 index 000000000..3e7f6e78c --- /dev/null +++ b/tests/src/Simple/StaticLibrary/StaticLibrary.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.InteropServices; + +namespace StaticLibrary +{ + public class ClassLibrary + { + [NativeCallable(EntryPoint = "Add", CallingConvention = CallingConvention.StdCall)] + public static int Add(int a, int b) + { + return a + b; + } + + [NativeCallable(EntryPoint = "Subtract", CallingConvention = CallingConvention.StdCall)] + public static int Subtract(int a, int b) + { + return a - b; + } + + [NativeCallable(EntryPoint = "Not", CallingConvention = CallingConvention.StdCall)] + public static bool Not(bool b) + { + return !b; + } + } +} |