@@ -26,16 +26,19 @@ public enum LicenseType
26
26
OrmLiteBusiness ,
27
27
RedisIndie ,
28
28
RedisBusiness ,
29
+ AwsIndie ,
30
+ AwsBusiness ,
29
31
Trial ,
30
32
}
31
33
32
34
[ Flags ]
33
35
public enum LicenseFeature : long
34
36
{
35
37
None = 0 ,
36
- All = Premium | Text | Client | Common | Redis | OrmLite | ServiceStack | Server | Razor | Admin ,
38
+ All = Premium | Text | Client | Common | Redis | OrmLite | ServiceStack | Server | Razor | Admin | Aws ,
37
39
RedisSku = Redis | Text ,
38
40
OrmLiteSku = OrmLite | Text ,
41
+ AwsSku = Aws | Text ,
39
42
Free = None ,
40
43
Premium = 1 << 0 ,
41
44
Text = 1 << 1 ,
@@ -47,6 +50,7 @@ public enum LicenseFeature : long
47
50
Server = 1 << 7 ,
48
51
Razor = 1 << 8 ,
49
52
Admin = 1 << 9 ,
53
+ Aws = 1 << 10 ,
50
54
}
51
55
52
56
public enum QuotaType
@@ -55,7 +59,7 @@ public enum QuotaType
55
59
Types , //Text, Redis
56
60
Fields , //ServiceStack, Text, Redis, OrmLite
57
61
RequestsPerHour , //Redis
58
- Tables , //OrmLite
62
+ Tables , //OrmLite, Aws
59
63
PremiumFeature , //AdminUI, Advanced Redis APIs, etc
60
64
}
61
65
@@ -125,6 +129,7 @@ public static class ErrorMessages
125
129
internal const string ExceededRedisTypes = "The free-quota limit on '{0} Redis Types' has been reached." + UpgradeInstructions ;
126
130
internal const string ExceededRedisRequests = "The free-quota limit on '{0} Redis requests per hour' has been reached." + UpgradeInstructions ;
127
131
internal const string ExceededOrmLiteTables = "The free-quota limit on '{0} OrmLite Tables' has been reached." + UpgradeInstructions ;
132
+ internal const string ExceededAwsTables = "The free-quota limit on '{0} AWS Tables' has been reached." + UpgradeInstructions ;
128
133
internal const string ExceededServiceStackOperations = "The free-quota limit on '{0} ServiceStack Operations' has been reached." + UpgradeInstructions ;
129
134
internal const string ExceededAdminUi = "The Admin UI is a commerical-only premium feature." + UpgradeInstructions ;
130
135
internal const string ExceededPremiumFeature = "Unauthorized use of a commerical-only premium feature." + UpgradeInstructions ;
@@ -139,6 +144,7 @@ public static class FreeQuotas
139
144
public const int RedisTypes = 20 ;
140
145
public const int RedisRequestPerHour = 6000 ;
141
146
public const int OrmLiteTables = 10 ;
147
+ public const int AwsTables = 10 ;
142
148
public const int PremiumFeature = 0 ;
143
149
}
144
150
@@ -260,6 +266,15 @@ public static void AssertValidUsage(LicenseFeature feature, QuotaType quotaType,
260
266
}
261
267
break ;
262
268
269
+ case LicenseFeature . Aws :
270
+ switch ( quotaType )
271
+ {
272
+ case QuotaType . Tables :
273
+ ApprovedUsage ( licensedFeatures , feature , FreeQuotas . AwsTables , count , ErrorMessages . ExceededAwsTables ) ;
274
+ return ;
275
+ }
276
+ break ;
277
+
263
278
case LicenseFeature . ServiceStack :
264
279
switch ( quotaType )
265
280
{
@@ -307,11 +322,15 @@ public static LicenseFeature GetLicensedFeatures(this LicenseKey key)
307
322
case LicenseType . TextIndie :
308
323
case LicenseType . TextBusiness :
309
324
return LicenseFeature . Text ;
310
-
325
+
311
326
case LicenseType . OrmLiteIndie :
312
327
case LicenseType . OrmLiteBusiness :
313
328
return LicenseFeature . OrmLiteSku ;
314
-
329
+
330
+ case LicenseType . AwsIndie :
331
+ case LicenseType . AwsBusiness :
332
+ return LicenseFeature . AwsSku ;
333
+
315
334
case LicenseType . RedisIndie :
316
335
case LicenseType . RedisBusiness :
317
336
return LicenseFeature . RedisSku ;
0 commit comments