コード例 #1
0
        public Controller()
        {
            //
            // the skiRunRepository object can be instantiated with different
            // repositories based on different data sources
            //
            skiRunRepository = new SkiRunRepositoryXML();

            ApplicationControl();
        }
コード例 #2
0
        public Controller()
        {
            if (DataSettings.dataFilePath == "Data\\Data.csv")
            {
                skiRunRepository = new SkiRunRepositoryCSV();
            }
            else if (DataSettings.dataFilePath == "Data\\Data.xml")
            {
                skiRunRepository = new SkiRunRepositoryXML_DS();
            }
            else
            {
                skiRunRepository = new SkiRunRepositoryJSON();
            }

            ApplicationControl();
        }
コード例 #3
0
 public void Dispose()
 {
     _skiRunRepository = null;
 }
コード例 #4
0
 public SkiRunBusiness(ISkiRunRepository repository)
 {
     _skiRunRepository = repository;
 }