private void Awake()
 {
     if (platforms.IsValid())
     {
         events.onTrue.Invoke();
     }
     else
     {
         events.onFalse.Invoke();
     }
 }
Example #2
0
        private string ValidateParams(string platform, string playerName)
        {
            if (!Platforms.IsValid(platform))
            {
                throw new ArgumentOutOfRangeException(nameof(platform));
            }
            if (string.IsNullOrWhiteSpace(playerName))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(playerName));
            }
            if (string.IsNullOrWhiteSpace(platform))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(platform));
            }

            return(HttpUtility.HtmlEncode(playerName));
        }