@@ -9,7 +9,7 @@ internal static class NetTypeApiExtension
9
9
{
10
10
internal static bool IsEnum ( this Type source )
11
11
{
12
- #if NETSTANDARD1_0
12
+ #if NETSTANDARD
13
13
return source . GetTypeInfo ( ) . IsEnum ;
14
14
#else
15
15
return source . IsEnum ;
@@ -18,7 +18,7 @@ internal static bool IsEnum(this Type source)
18
18
19
19
internal static PropertyInfo GetProperty ( this Type source , string name )
20
20
{
21
- #if NETSTANDARD1_0
21
+ #if NETSTANDARD
22
22
return source . GetTypeInfo ( ) . GetDeclaredProperty ( name ) ;
23
23
#else
24
24
return source . GetProperty ( name ) ;
@@ -27,7 +27,7 @@ internal static PropertyInfo GetProperty(this Type source, string name)
27
27
28
28
internal static IEnumerable < MethodInfo > GetMethods ( this Type source )
29
29
{
30
- #if NETSTANDARD1_0
30
+ #if NETSTANDARD
31
31
return source . GetTypeInfo ( ) . DeclaredMethods ;
32
32
#else
33
33
return source . GetMethods ( ) ;
@@ -36,7 +36,7 @@ internal static IEnumerable<MethodInfo> GetMethods(this Type source)
36
36
37
37
internal static MethodInfo GetSetterMethod ( this PropertyInfo source )
38
38
{
39
- #if NETSTANDARD1_0
39
+ #if NETSTANDARD
40
40
return source . SetMethod ;
41
41
#else
42
42
return source . GetSetMethod ( true ) ;
@@ -45,7 +45,7 @@ internal static MethodInfo GetSetterMethod(this PropertyInfo source)
45
45
46
46
internal static bool IsGenericType ( this Type source )
47
47
{
48
- #if NETSTANDARD1_0
48
+ #if NETSTANDARD
49
49
return source . GetTypeInfo ( ) . IsGenericType ;
50
50
#else
51
51
return source . IsGenericType ;
@@ -55,7 +55,7 @@ internal static bool IsGenericType(this Type source)
55
55
internal static bool IsValueType ( this Type source )
56
56
{
57
57
58
- #if NETSTANDARD1_0
58
+ #if NETSTANDARD
59
59
return source . GetTypeInfo ( ) . IsValueType ;
60
60
#else
61
61
return source . IsValueType ;
@@ -64,7 +64,7 @@ internal static bool IsValueType(this Type source)
64
64
65
65
internal static bool IsClass ( this Type source )
66
66
{
67
- #if NETSTANDARD1_0
67
+ #if NETSTANDARD
68
68
return source . GetTypeInfo ( ) . IsClass ;
69
69
#else
70
70
return source . IsClass ;
@@ -73,7 +73,7 @@ internal static bool IsClass(this Type source)
73
73
74
74
internal static bool IsInterface ( this Type source )
75
75
{
76
- #if NETSTANDARD1_0
76
+ #if NETSTANDARD
77
77
return source . GetTypeInfo ( ) . IsInterface ;
78
78
#else
79
79
return source . IsInterface ;
@@ -82,7 +82,7 @@ internal static bool IsInterface(this Type source)
82
82
83
83
internal static bool IsAbstract ( this Type source )
84
84
{
85
- #if NETSTANDARD1_0
85
+ #if NETSTANDARD
86
86
return source . GetTypeInfo ( ) . IsAbstract ;
87
87
#else
88
88
return source . IsAbstract ;
@@ -91,7 +91,7 @@ internal static bool IsAbstract(this Type source)
91
91
92
92
internal static IEnumerable < Type > GetImplementedInterfaces ( this Type source )
93
93
{
94
- #if NETSTANDARD1_0
94
+ #if NETSTANDARD
95
95
return source . GetTypeInfo ( ) . ImplementedInterfaces ;
96
96
#else
97
97
return source . GetInterfaces ( ) ;
@@ -100,7 +100,7 @@ internal static IEnumerable<Type> GetImplementedInterfaces(this Type source)
100
100
101
101
internal static IEnumerable < PropertyInfo > GetProperties ( this Type source , bool ignoreInheritance )
102
102
{
103
- #if NETSTANDARD1_0
103
+ #if NETSTANDARD
104
104
105
105
var propertyInfos = source . GetTypeInfo ( ) . DeclaredProperties . ToList ( ) ;
106
106
@@ -129,7 +129,7 @@ internal static IEnumerable<PropertyInfo> GetProperties(this Type source, bool i
129
129
130
130
internal static Type [ ] GetGenericTypeArguments ( this Type source )
131
131
{
132
- #if NETSTANDARD1_0
132
+ #if NETSTANDARD
133
133
return source . GetTypeInfo ( ) . GenericTypeArguments ;
134
134
#else
135
135
return source . GetGenericArguments ( ) ;
@@ -138,7 +138,7 @@ internal static Type[] GetGenericTypeArguments(this Type source)
138
138
139
139
internal static IEnumerable < ConstructorInfo > GetConstructors ( this Type source )
140
140
{
141
- #if NETSTANDARD1_0
141
+ #if NETSTANDARD
142
142
return source . GetTypeInfo ( ) . DeclaredConstructors ;
143
143
#else
144
144
return source . GetConstructors ( ) ;
@@ -147,7 +147,7 @@ internal static IEnumerable<ConstructorInfo> GetConstructors(this Type source)
147
147
148
148
internal static MethodInfo GetMethod ( this Type source , string name )
149
149
{
150
- #if NETSTANDARD1_0
150
+ #if NETSTANDARD
151
151
return source . GetTypeInfo ( ) . GetDeclaredMethod ( name ) ;
152
152
#else
153
153
return source . GetMethod ( name ) ;
@@ -156,7 +156,7 @@ internal static MethodInfo GetMethod(this Type source, string name)
156
156
157
157
internal static string GetModuleName ( this Type source )
158
158
{
159
- #if NETSTANDARD1_0
159
+ #if NETSTANDARD
160
160
return source . GetTypeInfo ( ) . Module . Name ;
161
161
#else
162
162
return source . Module . ScopeName ;
@@ -170,7 +170,7 @@ internal static Type GetTypeInfo(this Type source)
170
170
}
171
171
#endif
172
172
173
- #if NETSTANDARD1_0
173
+ #if NETSTANDARD
174
174
internal static void ForEach < T > ( this IEnumerable < T > source , Action < T > eachItem )
175
175
{
176
176
foreach ( T item in source )
0 commit comments