This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ public static class Env
10
10
{
11
11
static Env ( )
12
12
{
13
+ LicenseUtils . AssertEvaluationLicense ( ) ;
14
+
13
15
string platformName = null ;
14
16
15
17
#if NETFX_CORE
@@ -77,4 +79,15 @@ public static string ReferenceAssembyPath
77
79
set { referenceAssembyPath = value ; }
78
80
}
79
81
}
82
+
83
+ public static class LicenseUtils
84
+ {
85
+ public static void AssertEvaluationLicense ( )
86
+ {
87
+ if ( DateTime . UtcNow > new DateTime ( 2013 , 12 , 31 ) )
88
+ throw new Exception ( "The evaluation license for this software has expired. " +
89
+ "See http://www.servicestack.net to upgrade to a valid license." ) ;
90
+ }
91
+ }
92
+
80
93
}
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ public static ParseStringDelegate GetParseFn()
66
66
67
67
public static object Parse ( string value )
68
68
{
69
+ LicenseUtils . AssertEvaluationLicense ( ) ;
70
+
69
71
if ( ReadFn == null )
70
72
{
71
73
if ( typeof ( T ) . IsAbstract ( ) || typeof ( T ) . IsInterface ( ) )
Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ static JsonWriter()
177
177
178
178
public static void WriteObject ( TextWriter writer , object value )
179
179
{
180
+ LicenseUtils . AssertEvaluationLicense ( ) ;
181
+
180
182
#if MONOTOUCH
181
183
if ( writer == null ) return ;
182
184
#endif
You can’t perform that action at this time.
0 commit comments