public void DeserializeSolutionRequest() { SolutionRequest d = new SolutionRequest(); string xml = d.SerializeToXML(); d = (SolutionRequest)xml.DeserializeXML(); Assert.IsNotNull(d); }
protected abstract string ReceivedSolutionRequest(SolutionRequest solutionRequest);
protected override string ReceivedSolutionRequest(SolutionRequest solutionRequest) { Debug.Assert(false, "Should not be here"); return null; }
public void SerializeSolutionRequest() { SolutionRequest d = new SolutionRequest(); string xml = d.SerializeToXML(); Assert.IsNotNull(xml); }
protected override string ReceivedSolutionRequest(SolutionRequest solutionRequest) { /* Solution Request message is sent from the CC in order to check whether the cluster has successfully * computed the solution. It allows CC to be shut down and disconnected from server during computations. */ Solutions solution = new Solutions(); List<Solutions> solutions = this.serverQueues.FinalSolutions.ToList(); foreach (Solutions s in solutions) { if (s.Id == solutionRequest.Id) { solution = s; break; } } if (!this.BackupMode) Console.WriteLine("Sending Solutions"); return solution.SerializeToXML(); }