public XmlDataSource(CandidateList cList)
        {
            XmlFile = "polldata.xml";

            CList = cList;
            new XDocument(
                new XElement("Poll",
                             new XElement("Vote", cList.CandidateOne),
                             new XElement("Vote", cList.CandidateTwo)
                             )
                )
            .Save(XmlFile);
        }
Exemple #2
0
 public PollCalculator(CandidateList cList)
 {
     CList = cList;
 }
Exemple #3
0
 public Poller()
 {
     CList = new CandidateList();
     Data  = new XmlDataSource(CList);
     Calc  = new PollCalculator(CList);
 }