summaryrefslogtreecommitdiffstats
path: root/generator/plugins/dotnet/custom/Validators.cs
diff options
context:
space:
mode:
Diffstat (limited to 'generator/plugins/dotnet/custom/Validators.cs')
-rw-r--r--generator/plugins/dotnet/custom/Validators.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/generator/plugins/dotnet/custom/Validators.cs b/generator/plugins/dotnet/custom/Validators.cs
new file mode 100644
index 0000000..9edc18f
--- /dev/null
+++ b/generator/plugins/dotnet/custom/Validators.cs
@@ -0,0 +1,20 @@
+
+using System;
+
+public static class Validators
+{
+ public static bool HasType(Type[] types, Type type)
+ {
+ return types.Contains(type);
+ }
+
+ public static bool InIntegerRange(long value)
+ {
+ return value >= int.MinValue && value <= int.MaxValue;
+ }
+
+ public static bool InUIntegerRange(long value)
+ {
+ return value >= uint.MinValue && value <= uint.MaxValue;
+ }
+} \ No newline at end of file