Beispiel #1
0
        private MeetingProposal restoreLostMeeting(string topic)
        {
            Console.WriteLine("Restoring " + topic);
            string serversList = "servers.txt";

            string[] serversURLs = File.ReadAllLines(serversList);
            foreach (string url in serversURLs)
            {
                ServerObject server = (ServerObject)Activator.GetObject(typeof(ServerObject), url);
                if (server != null)
                {
                    MeetingProposal proposal      = server.getMeetingByTopic(topic);
                    MeetingProposal proposal_copy = new MeetingProposal(proposal);

                    if (proposal_copy != null)
                    {
                        this.createMeeting(proposal_copy.getCoordinator(), proposal_copy);
                        return(proposal_copy);
                    }
                }
            }
            return(null);
        }