/// <summary> /// Provides the JSON Representation of the WebServer /// </summary> /// <returns></returns> public string ToJSON() { return(string.Format(FormatInfo, string.Join(",", Banned.Select(ban => ban.ToString()).ToArray()), string.Join(",", Clients.Select(c => c.ToJSON()).ToArray()), Encoding.EncodingName, DisconnectTime.TotalMilliseconds.ToString(), Wake.TotalMilliseconds.ToString(), string.Join(",", Parts.Union(m_Sites.Keys).Select(p => '\'' + p + '\'').ToArray()), m_instanceId.ToString(), m_Port.ToString(), m_Identifier)); }