Beispiel #1
0
 public static MandelbrotJSON ReadFromString(string message)
 {
     try
     {
         return(JsonSerializer.Deserialize <MandelbrotJSON>(message));
     }
     catch
     {
         TcpConnector.End();
         TcpConnector.Serve();
         return(null);
     }
 }
Beispiel #2
0
        public static MandelbrotJSON ReadJSON(string filePath)
        {
            try
            {
                string         jsonString     = File.ReadAllText(filePath);
                MandelbrotJSON mandelbrotJSON = JsonSerializer.Deserialize <MandelbrotJSON>(jsonString);

                return(mandelbrotJSON);
            }
            catch
            {
                TcpConnector.End();
                TcpConnector.Serve();

                return(null);
            }
        }