${iServer2_Theme_ThemeRangeParam_Title}

${iServer2_Theme_ThemeRangeParam_Description}

        internal static string ToJson(ThemeRangeParam themeRangeParam)
        {
            if (themeRangeParam == null)
            {
                return null;
            }
            string json = "{";
            List<string> list = new List<string>();
            if (themeRangeParam.LayerName != null)
            {
                list.Add(string.Format("\"layerName\":\"{0}\"", themeRangeParam.LayerName));
            }

            list.Add(string.Format("\"colorGradientType\":{0}", (int)themeRangeParam.ColorGradientType));
            list.Add(string.Format("\"rangeMode\":{0}", (int)themeRangeParam.RangeMode));
            list.Add(string.Format("\"rangeParameter\":{0}", themeRangeParam.RangeParameter));

            json += string.Join(",", list.ToArray());
            json += "}";
            return json;
        }
        /// <summary>${iServer2_ThemeRangeParam_method_FromJson_D}</summary>
        /// <returns>${iServer2_ThemeRangeParam_method_FromJson_return}</returns>
        /// <param name="jsonObject">${iServer2_ThemeRangeParam_method_FromJson_param_jsonObject}</param>
        public static ThemeRangeParam FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }

            ThemeRangeParam result = new ThemeRangeParam();

            result.LayerName = (string)jsonObject["layerName"];
            if (jsonObject["colorGradientType"] != null)
            {
                result.ColorGradientType = (ColorGradientType)(int)jsonObject["colorGradientType"];
            }
            if (jsonObject["rangeMode"] != null)
            {
                result.RangeMode = (RangeMode)(int)jsonObject["rangeMode"];
            }
            result.RangeParameter = (double)jsonObject["rangeParameter"];

            return result;
        }