public void SetCustomData(Dictionary <string, string> data)
 {
     if (data == null)
     {
         customData = null;
     }
     else
     {
         customData = data.ToKeyValueArray();
         CustomDataHelper.ValidateCustomData(customData);
     }
 }
        public bool Validate()
        {
            CustomDataHelper.ValidateCustomData(customData);

            if (string.IsNullOrEmpty(protocol))
            {
                Logger.LogError("ServerJson should not have empty protocol");
                return(false);
            }

            if (port == 0)
            {
                Logger.LogError("ServerJson should not have port equal 0");
                return(false);
            }

            if (maxPlayerCount == 0)
            {
                Logger.LogError("ServerJson should not have maxPlayerCount equal 0");
                return(false);
            }

            return(true);
        }
 public void Validate()
 {
     CustomDataHelper.ValidateCustomData(customData);
 }