public void DeserializeSolutionRequest()
 {
     SolutionRequest d = new SolutionRequest();
     string xml = d.SerializeToXML();
     d = (SolutionRequest)xml.DeserializeXML();
     Assert.IsNotNull(d);
 }
Пример #2
0
 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);
 }
Пример #5
0
        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();
        }