예제 #1
0
        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);
        }
예제 #2
0
 public PollCalculator(CandidateList cList)
 {
     CList = cList;
 }
예제 #3
0
 public Poller()
 {
     CList = new CandidateList();
     Data  = new XmlDataSource(CList);
     Calc  = new PollCalculator(CList);
 }