Exemplo n.º 1
0
 /// <summary>
 /// Updates the customData array
 /// </summary>
 /// <param name="data"></param>
 public void SetCustomData(Dictionary <string, string> data)
 {
     if (data == null)
     {
         customData = null;
     }
     else
     {
         customData = data.ToKeyValueArray();
         CustomDataHelper.ValidateCustomData(customData);
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void Validate()
 {
     CustomDataHelper.ValidateCustomData(customData);
 }