private readonly ProductListQuery productListQuery; //na zaplatenie najst product public UnitService(UnitRepository unitRepository, UnitTypeRepository unitTypeRepository, VillageRepository villageRepository, ProductRepository productRepository, ProductTypeRepository productTypeRepository, UnitListQuery unitListQuery, ProductListQuery productListQuery) { this.unitRepository = unitRepository; this.productRepository = productRepository; this.unitListQuery = unitListQuery; this.productListQuery = productListQuery; }
public VillageService(PlayerRepository playerRepository, VillageRepository villageRepository, BuildingRepository buildingRepository, BuildingTypeRepository buildingTypeRepository, UnitRepository unitRepository, UnitTypeRepository unitTypeRepository, ProductRepository productRepository, ProductTypeRepository productTypeRepository, ResourceRepository resourceRepository, ResourceTypeRepository resourceTypeRepository, BuildingListQuery buildingListQuery, BuildingTypeListQuery buildingTypeListQuery, ProductListQuery productListQuery, ProductTypeListQuery productTypeListQuery, ResourceTypeListQuery resourceTypeListQuery, UnitTypeListQuery unitTypeListQuery, VillageListQuery villageListQuery, AdventureRepository adventureRepository, AdventureTypeRepository adventureTypeRepository, AdventureTypeListQuery adventureTypeListQuery, UnitListQuery unitListQuery) { this.playerRepository = playerRepository; this.villageRepository = villageRepository; this.buildingRepository = buildingRepository; this.buildingTypeRepository = buildingTypeRepository; this.unitRepository = unitRepository; this.unitTypeRepository = unitTypeRepository; this.productRepository = productRepository; this.productTypeRepository = productTypeRepository; this.resourceRepository = resourceRepository; this.resourceTypeRepository = resourceTypeRepository; this.adventureRepository = adventureRepository; this.adventureTypeRepository = adventureTypeRepository; this.buildingTypeListQuery = buildingTypeListQuery; this.productTypeListQuery = productTypeListQuery; this.productListQuery = productListQuery; this.resourceTypeListQuery = resourceTypeListQuery; this.unitTypeListQuery = unitTypeListQuery; this.adventureTypeListQuery = adventureTypeListQuery; this.villageListQuery = villageListQuery; this.unitListQuery = unitListQuery; }
private void InitFilter() { Filter = new UnitFilter(); ComplexFilterParams = new UnitFilterParams(); var unitTypeRepository = new UnitTypeRepository(); FilterUnitTypeList = unitTypeRepository.GetAll(type => type.TypeName); var repository = Repository as UnitRepository; if (repository != null) { FilterManufactureList = repository.GetManufactureList(); FilterModelNameList = repository.GetModelList(); } var ownerRepository = new OwnerRepository(); FilterOwnerList = ownerRepository.GetAll(owner => owner.Name.DisplayName); var statusRepository = new StatusRepository(); FilterStatusList = statusRepository.GetAll(x => x.StatusType); }
private void InitLists() { var unitTypeRepository = new UnitTypeRepository(); UnitTypes = new ObservableCollection <UnitType>(unitTypeRepository.GetAllOrdered()); var ownerRepository = new OwnerRepository(); OwnerList = new ObservableCollection <Owner>(ownerRepository.GetAllOrdered()); var statusRepository = new StatusRepository(); StatusList = new ObservableCollection <Status>(statusRepository.GetAllOrdered()); }