This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 22//License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt
33
44using System ;
5+ using System . Globalization ;
56using System . IO ;
67
78namespace ServiceStack . Text
@@ -47,9 +48,9 @@ static Env()
4748 + platformName
4849 + ( IsMono ? "/Mono" : "/.NET" ) ;
4950
50- VersionString = ServiceStackVersion . ToString ( ) ;
51+ VersionString = ServiceStackVersion . ToString ( CultureInfo . InvariantCulture ) ;
5152
52- __releaseDate = DateTime . Parse ( " 2001-01-01" ) ;
53+ __releaseDate = new DateTime ( 2001 , 01 , 01 ) ;
5354 }
5455
5556 public static string VersionString { get ; set ; }
Original file line number Diff line number Diff line change 33
44using System ;
55using System . Collections . Generic ;
6+ using System . Globalization ;
67using System . IO ;
78using System . Text . RegularExpressions ;
9+ using System . Threading ;
810using ServiceStack . Text ;
911
1012namespace ServiceStack
@@ -160,8 +162,11 @@ public static void AssertEvaluationLicense()
160162 public static void RegisterLicense ( string licenseKeyText )
161163 {
162164 string cutomerId = null ;
165+ var hold = Thread . CurrentThread . CurrentCulture ;
166+
163167 try
164168 {
169+ Thread . CurrentThread . CurrentCulture = CultureInfo . InvariantCulture ;
165170 var parts = licenseKeyText . SplitOnFirst ( '-' ) ;
166171 cutomerId = parts [ 0 ] ;
167172
@@ -193,6 +198,10 @@ public static void RegisterLicense(string licenseKeyText)
193198
194199 throw new LicenseException ( msg ) . Trace ( ) ;
195200 }
201+ finally
202+ {
203+ Thread . CurrentThread . CurrentCulture = hold ;
204+ }
196205 }
197206
198207 public static void RemoveLicense ( )
@@ -355,6 +364,7 @@ public static LicenseKey ToLicenseKey(this string licenseKeyText)
355364 {
356365 JsConfig < DateTime > . DeSerializeFn = null ;
357366 JsConfig < DateTime > . RawDeserializeFn = null ;
367+
358368 var key = jsv . FromJsv < LicenseKey > ( ) ;
359369
360370 if ( key . Ref != refId )
You can’t perform that action at this time.
0 commit comments