@@ -122,58 +122,58 @@ enum ParseState
122
122
public static sbyte ParseSByte ( this StringSegment value )
123
123
{
124
124
return JsConfig . UseSystemParseMethods
125
- ? sbyte . Parse ( value . Value )
125
+ ? sbyte . Parse ( value . Value , CultureInfo . InvariantCulture )
126
126
: ( sbyte ) ParseSignedInteger ( value , sbyte . MaxValue , sbyte . MinValue ) ;
127
127
}
128
128
129
129
public static byte ParseByte ( this StringSegment value )
130
130
{
131
131
return JsConfig . UseSystemParseMethods
132
- ? byte . Parse ( value . Value )
132
+ ? byte . Parse ( value . Value , CultureInfo . InvariantCulture )
133
133
: ( byte ) ParseUnsignedInteger ( value , byte . MaxValue ) ;
134
134
}
135
135
136
136
public static short ParseInt16 ( this StringSegment value )
137
137
{
138
138
return JsConfig . UseSystemParseMethods
139
- ? short . Parse ( value . Value )
139
+ ? short . Parse ( value . Value , CultureInfo . InvariantCulture )
140
140
: ( short ) ParseSignedInteger ( value , short . MaxValue , short . MinValue ) ;
141
141
}
142
142
143
143
public static ushort ParseUInt16 ( this StringSegment value )
144
144
{
145
145
return JsConfig . UseSystemParseMethods
146
- ? ushort . Parse ( value . Value )
146
+ ? ushort . Parse ( value . Value , CultureInfo . InvariantCulture )
147
147
: ( ushort ) ParseUnsignedInteger ( value , ushort . MaxValue ) ;
148
148
}
149
149
150
150
151
151
public static int ParseInt32 ( this StringSegment value )
152
152
{
153
153
return JsConfig . UseSystemParseMethods
154
- ? int . Parse ( value . Value )
154
+ ? int . Parse ( value . Value , CultureInfo . InvariantCulture )
155
155
: ( int ) ParseSignedInteger ( value , Int32 . MaxValue , Int32 . MinValue ) ;
156
156
}
157
157
158
158
public static uint ParseUInt32 ( this StringSegment value )
159
159
{
160
160
return JsConfig . UseSystemParseMethods
161
- ? uint . Parse ( value . Value )
161
+ ? uint . Parse ( value . Value , CultureInfo . InvariantCulture )
162
162
: ( uint ) ParseUnsignedInteger ( value , UInt32 . MaxValue ) ;
163
163
}
164
164
165
165
public static long ParseInt64 ( this StringSegment value )
166
166
{
167
167
return JsConfig . UseSystemParseMethods
168
- ? long . Parse ( value . Value )
168
+ ? long . Parse ( value . Value , CultureInfo . InvariantCulture )
169
169
: ParseSignedInteger ( value , Int64 . MaxValue , Int64 . MinValue ) ;
170
170
171
171
}
172
172
173
173
public static ulong ParseUInt64 ( this StringSegment value )
174
174
{
175
175
return JsConfig . UseSystemParseMethods
176
- ? ulong . Parse ( value . Value )
176
+ ? ulong . Parse ( value . Value , CultureInfo . InvariantCulture )
177
177
: ParseUnsignedInteger ( value , UInt64 . MaxValue ) ;
178
178
}
179
179
0 commit comments