Beispiel #1
0
 public static bool ValidateEventPartCharacters(string eventPart)
 {
     if (!GAValidator.StringMatch(eventPart, "^[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}$"))
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 public static bool ValidateKeys(string gameKey, string gameSecret)
 {
     if (GAValidator.StringMatch(gameKey, "^[A-z0-9]{32}$") && GAValidator.StringMatch(gameSecret, "^[A-z0-9]{40}$"))
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public static bool ValidateEventIdCharacters(string eventId)
 {
     if (string.IsNullOrEmpty(eventId))
     {
         return(false);
     }
     if (!GAValidator.StringMatch(eventId, "^[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}(:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}){0,4}$"))
     {
         return(false);
     }
     return(true);
 }
Beispiel #4
0
 public static bool ValidateEventIdLength(string eventId)
 {
     if (string.IsNullOrEmpty(eventId))
     {
         return(false);
     }
     if (!GAValidator.StringMatch(eventId, "^[^:]{1,64}(?::[^:]{1,64}){0,4}$"))
     {
         return(false);
     }
     return(true);
 }
Beispiel #5
0
 public static bool ValidateCurrency(string currency)
 {
     if (string.IsNullOrEmpty(currency))
     {
         return(false);
     }
     if (!GAValidator.StringMatch(currency, "^[A-Z]{3}$"))
     {
         return(false);
     }
     return(true);
 }
Beispiel #6
0
 public static bool ValidateResourceCurrencies(params string[] resourceCurrencies)
 {
     if (!GAValidator.ValidateArrayOfStrings(20L, 64L, false, "resource currencies", resourceCurrencies))
     {
         return(false);
     }
     foreach (string resourceCurrency in resourceCurrencies)
     {
         if (!GAValidator.StringMatch(resourceCurrency, "^[A-Za-z]+$"))
         {
             Debug.Log((object)("resource currencies validation failed: a resource currency can only be A-Z, a-z. String was: " + resourceCurrency));
             return(false);
         }
     }
     return(true);
 }
Beispiel #7
0
 public static bool ValidateResourceCurrencies(params string[] resourceCurrencies)
 {
     if (!GAValidator.ValidateArrayOfStrings((long)20, (long)64, false, "resource currencies", resourceCurrencies))
     {
         return(false);
     }
     string[] strArrays = resourceCurrencies;
     for (int i = 0; i < (int)strArrays.Length; i++)
     {
         string str = strArrays[i];
         if (!GAValidator.StringMatch(str, "^[A-Za-z]+$"))
         {
             Debug.Log(string.Concat("resource currencies validation failed: a resource currency can only be A-Z, a-z. String was: ", str));
             return(false);
         }
     }
     return(true);
 }
Beispiel #8
0
 public static bool ValidateConnectionType(string connectionType)
 {
     return(GAValidator.StringMatch(connectionType, "^(wwan|wifi|lan|offline)$"));
 }
Beispiel #9
0
 public static bool ValidateEventIdLength(string eventId)
 {
     return(!string.IsNullOrEmpty(eventId) && GAValidator.StringMatch(eventId, "^[^:]{1,64}(?::[^:]{1,64}){0,4}$"));
 }
Beispiel #10
0
 public static bool ValidateCurrency(string currency)
 {
     return(!string.IsNullOrEmpty(currency) && GAValidator.StringMatch(currency, "^[A-Z]{3}$"));
 }