public Computation(MandelbrotJSON mandelbrotJSON) { center = mandelbrotJSON.Center; maxIterations = mandelbrotJSON.MaxIterations; zoom = mandelbrotJSON.Zoom; WidthPixel = mandelbrotJSON.WidthPixel; HeightPixel = mandelbrotJSON.HeightPixel; }
static Bitmap ManageComputationRequest(string message) { MandelbrotJSON mandelbrotJSON = ConverterJSON.ReadFromString(message); if(mandelbrotJSON==null) { TcpConnector.End(); TcpConnector.Serve(); } Computation computation = new Computation(mandelbrotJSON); return computation.ComputeMandelbrot(); }