forked from ThatRendle/Simple.Data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeHelper.cs
More file actions
36 lines (33 loc) · 1.86 KB
/
TypeHelper.cs
File metadata and controls
36 lines (33 loc) · 1.86 KB
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
35
36
using System;
using System.Collections.Generic;
namespace Simple.Data.Ado
{
using System.Data;
static class TypeHelper
{
private static readonly HashSet<Type> BaseTypes = new HashSet<Type>
{
typeof (bool),
typeof (char),
typeof (sbyte),
typeof (byte),
typeof (short),
typeof (ushort),
typeof (int),
typeof (uint),
typeof (long),
typeof (ulong),
typeof (float),
typeof (double),
typeof (decimal),
typeof (DateTime),
typeof (string),
typeof (byte[]),
typeof (Guid),
};
public static bool IsKnownType(Type type)
{
return BaseTypes.Contains(type);
}
}
}