@@ -16,14 +16,26 @@ public void Wrap(ref Expression expression)
16
16
{
17
17
expression = WrappedConstant ( ( bool ) constantExpression . Value ) ;
18
18
}
19
+ else if ( constantExpression . Type == typeof ( bool ? ) )
20
+ {
21
+ expression = WrappedConstant ( ( bool ? ) constantExpression . Value ) ;
22
+ }
19
23
else if ( constantExpression . Type == typeof ( char ) )
20
24
{
21
25
expression = WrappedConstant ( ( char ) constantExpression . Value ) ;
22
26
}
27
+ else if ( constantExpression . Type == typeof ( char ? ) )
28
+ {
29
+ expression = WrappedConstant ( ( char ? ) constantExpression . Value ) ;
30
+ }
23
31
else if ( constantExpression . Type == typeof ( byte ) )
24
32
{
25
33
expression = WrappedConstant ( ( byte ) constantExpression . Value ) ;
26
34
}
35
+ else if ( constantExpression . Type == typeof ( byte ? ) )
36
+ {
37
+ expression = WrappedConstant ( ( byte ? ) constantExpression . Value ) ;
38
+ }
27
39
else if ( constantExpression . Type == typeof ( sbyte ) )
28
40
{
29
41
expression = WrappedConstant ( ( sbyte ) constantExpression . Value ) ;
@@ -36,54 +48,106 @@ public void Wrap(ref Expression expression)
36
48
{
37
49
expression = WrappedConstant ( ( float ) constantExpression . Value ) ;
38
50
}
51
+ else if ( constantExpression . Type == typeof ( float ? ) )
52
+ {
53
+ expression = WrappedConstant ( ( float ? ) constantExpression . Value ) ;
54
+ }
39
55
else if ( constantExpression . Type == typeof ( decimal ) )
40
56
{
41
57
expression = WrappedConstant ( ( decimal ) constantExpression . Value ) ;
42
58
}
59
+ else if ( constantExpression . Type == typeof ( decimal ? ) )
60
+ {
61
+ expression = WrappedConstant ( ( decimal ? ) constantExpression . Value ) ;
62
+ }
43
63
else if ( constantExpression . Type == typeof ( double ) )
44
64
{
45
65
expression = WrappedConstant ( ( double ) constantExpression . Value ) ;
46
66
}
67
+ else if ( constantExpression . Type == typeof ( double ? ) )
68
+ {
69
+ expression = WrappedConstant ( ( double ? ) constantExpression . Value ) ;
70
+ }
47
71
else if ( constantExpression . Type == typeof ( long ) )
48
72
{
49
73
expression = WrappedConstant ( ( long ) constantExpression . Value ) ;
50
74
}
75
+ else if ( constantExpression . Type == typeof ( long ? ) )
76
+ {
77
+ expression = WrappedConstant ( ( long ? ) constantExpression . Value ) ;
78
+ }
51
79
else if ( constantExpression . Type == typeof ( ulong ) )
52
80
{
53
81
expression = WrappedConstant ( ( ulong ) constantExpression . Value ) ;
54
82
}
83
+ else if ( constantExpression . Type == typeof ( ulong ? ) )
84
+ {
85
+ expression = WrappedConstant ( ( ulong ? ) constantExpression . Value ) ;
86
+ }
55
87
else if ( constantExpression . Type == typeof ( int ) )
56
88
{
57
89
expression = WrappedConstant ( ( int ) constantExpression . Value ) ;
58
90
}
91
+ else if ( constantExpression . Type == typeof ( int ? ) )
92
+ {
93
+ expression = WrappedConstant ( ( int ? ) constantExpression . Value ) ;
94
+ }
59
95
else if ( constantExpression . Type == typeof ( uint ) )
60
96
{
61
97
expression = WrappedConstant ( ( uint ) constantExpression . Value ) ;
62
98
}
99
+ else if ( constantExpression . Type == typeof ( uint ? ) )
100
+ {
101
+ expression = WrappedConstant ( ( uint ? ) constantExpression . Value ) ;
102
+ }
63
103
else if ( constantExpression . Type == typeof ( short ) )
64
104
{
65
105
expression = WrappedConstant ( ( short ) constantExpression . Value ) ;
66
106
}
107
+ else if ( constantExpression . Type == typeof ( short ? ) )
108
+ {
109
+ expression = WrappedConstant ( ( short ? ) constantExpression . Value ) ;
110
+ }
67
111
else if ( constantExpression . Type == typeof ( ushort ) )
68
112
{
69
113
expression = WrappedConstant ( ( ushort ) constantExpression . Value ) ;
70
114
}
115
+ else if ( constantExpression . Type == typeof ( ushort ? ) )
116
+ {
117
+ expression = WrappedConstant ( ( ushort ? ) constantExpression . Value ) ;
118
+ }
71
119
else if ( constantExpression . Type == typeof ( Guid ) )
72
120
{
73
121
expression = WrappedConstant ( ( Guid ) constantExpression . Value ) ;
74
122
}
123
+ else if ( constantExpression . Type == typeof ( Guid ? ) )
124
+ {
125
+ expression = WrappedConstant ( ( Guid ? ) constantExpression . Value ) ;
126
+ }
75
127
else if ( constantExpression . Type == typeof ( DateTime ) )
76
128
{
77
129
expression = WrappedConstant ( ( DateTime ) constantExpression . Value ) ;
78
130
}
131
+ else if ( constantExpression . Type == typeof ( DateTime ? ) )
132
+ {
133
+ expression = WrappedConstant ( ( DateTime ? ) constantExpression . Value ) ;
134
+ }
79
135
else if ( constantExpression . Type == typeof ( DateTimeOffset ) )
80
136
{
81
137
expression = WrappedConstant ( ( DateTimeOffset ) constantExpression . Value ) ;
82
138
}
139
+ else if ( constantExpression . Type == typeof ( DateTimeOffset ? ) )
140
+ {
141
+ expression = WrappedConstant ( ( DateTimeOffset ? ) constantExpression . Value ) ;
142
+ }
83
143
else if ( constantExpression . Type == typeof ( TimeSpan ) )
84
144
{
85
145
expression = WrappedConstant ( ( TimeSpan ) constantExpression . Value ) ;
86
146
}
147
+ else if ( constantExpression . Type == typeof ( TimeSpan ? ) )
148
+ {
149
+ expression = WrappedConstant ( ( TimeSpan ? ) constantExpression . Value ) ;
150
+ }
87
151
88
152
return ;
89
153
}
@@ -94,18 +158,34 @@ public void Wrap(ref Expression expression)
94
158
{
95
159
expression = WrappedConstant ( Expression . Lambda < Func < Guid > > ( newExpression ) . Compile ( ) ( ) ) ;
96
160
}
161
+ else if ( newExpression . Type == typeof ( Guid ? ) )
162
+ {
163
+ expression = WrappedConstant ( Expression . Lambda < Func < Guid ? > > ( newExpression ) . Compile ( ) ( ) ) ;
164
+ }
97
165
else if ( newExpression . Type == typeof ( DateTime ) )
98
166
{
99
167
expression = WrappedConstant ( Expression . Lambda < Func < DateTime > > ( newExpression ) . Compile ( ) ( ) ) ;
100
168
}
169
+ else if ( newExpression . Type == typeof ( DateTime ? ) )
170
+ {
171
+ expression = WrappedConstant ( Expression . Lambda < Func < DateTime ? > > ( newExpression ) . Compile ( ) ( ) ) ;
172
+ }
101
173
else if ( newExpression . Type == typeof ( DateTimeOffset ) )
102
174
{
103
175
expression = WrappedConstant ( Expression . Lambda < Func < DateTimeOffset > > ( newExpression ) . Compile ( ) ( ) ) ;
104
176
}
177
+ else if ( newExpression . Type == typeof ( DateTimeOffset ? ) )
178
+ {
179
+ expression = WrappedConstant ( Expression . Lambda < Func < DateTimeOffset ? > > ( newExpression ) . Compile ( ) ( ) ) ;
180
+ }
105
181
else if ( newExpression . Type == typeof ( TimeSpan ) )
106
182
{
107
183
expression = WrappedConstant ( Expression . Lambda < Func < TimeSpan > > ( newExpression ) . Compile ( ) ( ) ) ;
108
184
}
185
+ else if ( newExpression . Type == typeof ( TimeSpan ? ) )
186
+ {
187
+ expression = WrappedConstant ( Expression . Lambda < Func < TimeSpan ? > > ( newExpression ) . Compile ( ) ( ) ) ;
188
+ }
109
189
}
110
190
}
111
191
0 commit comments