Beispiel #1
0
        public VehicleFamilyCache(ApplicationSettings applicationSettings, IErrorDialogService errorDialogService)
        {
            Settings = applicationSettings;
            Repo     = new VehicleFamilyRepo(Settings.VehicleFamilyLocation, errorDialogService);
            Cache    = new HashSet <VehicleFamily>(new VehicleFamilyEqualityComparer());

            Populate();
        }
        public override void Initialize()
        {
            SetupCatalogInitializer(ExtraLaunchers.AddNone);

            Settings = new ApplicationSettings();

            var path        = Settings.VehicleFamilyLocation;
            var errorReport = new ErrorReport(false);

            Repo             = new VehicleFamilyRepo(path, errorReport);
            DirectoryCreator = new DirectoryCreator(Settings, errorReport);

            DirectoryCreator.CreateVehicleFamilyStorageLocation();

            var familyName = Family.Name;

            PathHolder.DirectoryPath = $"{path}/{familyName}";
            PathHolder.XMLPath       = $"{path}/{familyName}/{familyName}.xml";
        }
Beispiel #3
0
        public override void Initialize()
        {
            SetupCatalogInitializer(ExtraLaunchers.AddNone);

            Settings = new ApplicationSettings();

            var path        = Settings.VehicleFamilyLocation;
            var errorReport = new ErrorReport(false);

            DirectoryCreator = new DirectoryCreator(Settings, errorReport);
            DirectoryCreator.CreateVehicleFamilyStorageLocation();

            var repo = new VehicleFamilyRepo(path, errorReport);

            repo.Create(Family);

            Cache = new VehicleFamilyCache(Settings, errorReport);
            AdditionalFamilies = new[]
            {
                new VehicleFamily("Falcon"),
                new VehicleFamily("Delta"),
                new VehicleFamily("Atlas"),
            };
        }