SuperMap.Web.iServerJava6R.ThemeFlow.ToJson C# (CSharp) Method

ToJson() static private method

static private ToJson ( ThemeFlow flowTheme ) : string
flowTheme ThemeFlow
return string
        internal static string ToJson(ThemeFlow flowTheme)
        {
            string json = "";
            List<string> list = new List<string>();

            if (flowTheme.LeaderLineStyle != null)
            {
                list.Add(string.Format("\"leaderLineStyle\":{0}", ServerStyle.ToJson(flowTheme.LeaderLineStyle)));
            }
            else
            {
                list.Add(string.Format("\"leaderLineStyle\":{0}", ServerStyle.ToJson(new ServerStyle())));
            }

            list.Add(string.Format("\"flowEnabled\":{0}", flowTheme.FlowEnabled.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));
            list.Add(string.Format("\"leaderLineDisplayed\":{0}", flowTheme.LeaderLineDisplayed.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));

            json = string.Join(",", list.ToArray());
            return json;
        }