public AccountController(ICarServices carServices, IRoleProvider roleProvider, ICarProvider carProvider, IImageProccessorServices imageProccessorServices) { this.carServices = carServices; this.roleProvider = roleProvider; this.carProvider = carProvider; this.imageProccessorServices = imageProccessorServices; }
public AdminController(IAdminServices adminServices, IUserServices userServices, ICarServices carServices) { this.adminServices = adminServices; this.userServices = userServices; this.carServices = carServices; }
public CarController(ICarServices iCarServ, IStringLocalizer <CarController> localizer, IStringLocalizer <SharedResources> sharedLocalizer) { _carServ = iCarServ; _localizer = localizer; _sharedLocalizer = sharedLocalizer; }
public CarController(ICarServices carService, UserManager <ApplicationUser> userManager, IMapper mapper, IUserServices userServices) { this.carServices = carService; this.userManager = userManager; this.mapper = mapper; this.userServices = userServices; }
public TeamServices(ApplicationDbContext dbContext, ICarServices carServices, IMoneyAccountServices moneyAccountServices, IRallyPilotsServices rallyPilots, IRallyNavigatorsServices navigatorsServices) { this.dbContext = dbContext; this.car = carServices; this.money = moneyAccountServices; this.pilot = rallyPilots; this.navigator = navigatorsServices; }
public AdminCarController(UserManager <ApplicationUser> userManager, IMapper mapper, IAdminServices adminServices, IUserServices userServices, ICarServices carServices) { this.userManager = userManager; this.mapper = mapper; this.adminServices = adminServices; this.userServices = userServices; this.carServices = carServices; }
public AdminUserController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, IAdminServices adminServices, IUserServices userServices, ICarServices carServices, IMapper mapper) { this.userManager = userManager; this.roleManager = roleManager; this.mapper = mapper; this.adminServices = adminServices; this.userServices = userServices; this.carServices = carServices; }
public CompetitionsController(ILogger <CompetitionsController> logger, ICarServices carServices, ICompetitionsServices competitionsServices, ITeamServices teamServices, IRallyPilotsServices rallyPilots, IRallyNavigatorsServices rallyNavigators, IRunwaysServices runwaysServices) { this._logger = logger; this.cars = carServices; this.competitions = competitionsServices; this.teams = teamServices; this.pilots = rallyPilots; this.navigators = rallyNavigators; this.runways = runwaysServices; }
public BookingCarController(IMapper mapper, IEmployeeServices employeeServices, ITicketSerivces ticketSerivces, IDriverServices driverServices, ICarServices carServices, IBusinessUnitSerivces businessUnitSerivces, ITripServices tripServices) { _mapper = mapper; _employeeServices = employeeServices; _ticketSerivces = ticketSerivces; _driverServices = driverServices; _carServices = carServices; _businessUnitServices = businessUnitSerivces; _tripServices = tripServices; }
public CompetitionsServices(ApplicationDbContext dbContext, ICarServices carServices, ITeamServices teamServices, IRallyPilotsServices pilotsServices, IRallyNavigatorsServices navigatorsServices, IRunwaysServices runwaysServices, IRaceHistoryServices raceHistoryServices, IPeople people, IRatingListServices ratingListServices, IMoneyAccountServices moneyAccountServices) { this.dbContext = dbContext; this.cars = carServices; this.team = teamServices; this.pilots = pilotsServices; this.navigators = navigatorsServices; this.runways = runwaysServices; this.raceHistory = raceHistoryServices; this.people = people; this.money = moneyAccountServices; this.ratingList = ratingListServices; }
public ApiMutation(IAutoMakerServices autoMakerServices, ICarServices carServices) { Name = "Mutation"; Field <AutoMakerType>( "createautomaker", description: "Create a new Automaker", arguments: new QueryArguments( new QueryArgument <AutoMakerInputType> { Name = "input" } ), resolve: (context) => { var dto = autoMakerServices.Create(context.GetArgument <AutoMakerDto>("input")); if (dto.Valid) { return(dto); } throw new ExecutionError(dto.Message); } ); Field <CarType>( "createcar", description: "Create a new Car", arguments: new QueryArguments( new QueryArgument <CarInputType> { Name = "input" } ), resolve: (context) => { var dto = carServices.Create(context.GetArgument <CarDto>("input")); if (dto.Valid) { return(dto); } throw new ExecutionError(dto.Message); } ); }
public CarsController(ICarServices carService) { _carService = carService; }
public CarsController(ILogger <CarsController> logger, ICarServices carServices) { this._logger = logger; this.car = carServices; }
public CarsController(ICarServices service) { _service = service; }
private void CompetitiveStage(IRallyPilotsServices pilots, IPeople people, IRallyNavigatorsServices navigators, ITeamServices team, IRaceHistoryServices raceHistory, ICarServices cars, List <CompetitionsTeams> teams, RallyRunway runway, int count, List <CompetitionsTeams> crashed, decimal stages, int numberStage) { string input = string.Empty; for (int i = 0; i < count; i++) { var pilot = pilots.GetPilotNoTracking(teams[i].PilotId); var energyPilot = pilots.EnergyPilot(teams[i].PilotId) - stages * damageConstant; people.ReduceEnergy(pilot, energyPilot); var navigator = navigators.GetNavigator(teams[i].NavigatorId); var energyNavigator = navigators.EnergyNavigator(teams[i].NavigatorId) - stages * damageConstant; people.ReduceEnergy(navigator, energyNavigator); var teamRace = team.FindUserAsync(teams[i].TeamId).GetAwaiter().GetResult(); int drive; if (numberStage == 1) { if (i == 0) { if (teams[i].Drive == DriveType.Aggressive) { input = $"Първи стартира отборът на {teamRace.Name}, с пилот {pilot.FirstName}, който тръгва с мръсна газ. Наблюдаваме доста агресивно" + $" каране дано, навигатор до него {navigator.FirstName} му влее малко разум."; drive = 3; } else if (teams[i].Drive == DriveType.Normal) { input = $"Първи стартира отборът на {teamRace.Name}, с пилот {pilot.FirstName}" + $" и навигатор до него {navigator.FirstName} "; drive = 2; } else { input = $"Първи стартира отборът на {teamRace.Name}, с пилот {pilot.FirstName}, който потегля доста плахо. С това предпазливо каране, ще " + $"изостане доста в класацията, дано навигатор до него {navigator.FirstName} му повлияе полужително."; drive = 1; } } else { if (teams[i].Drive == DriveType.Aggressive) { input = $"Следващ е отборът на {teamRace.Name}, с пилот {pilot.FirstName}, който тръгва с мръсна газ. Наблюдаваме доста агресивно" + $" каране дано, навигатор до него {navigator.FirstName} му влее малко разум."; drive = 3; } else if (teams[i].Drive == DriveType.Normal) { input = $"Следващия отборът на старта е {teamRace.Name}, с пилот {pilot.FirstName}" + $" и навигатор до него {navigator.FirstName} "; drive = 2; } else { input = $"Към старт линията се приближава отборът на {teamRace.Name}, с пилот {pilot.FirstName}, който потегля доста плахо. С това предпазливо каране, ще " + $"изостане доста в класацията, дано навигатор до него {navigator.FirstName} му повлияе полужително."; drive = 1; } } } else { if (teams[i].Drive == DriveType.Aggressive) { input = $"Пилот {pilot.FirstName} от отборът на {teamRace.Name}, продължава с агресивното шофиране. Не съм обеден че това ще му донесе привилегии " + $" за напред. Дано, навигатор до него {navigator.FirstName} го успокой за да не станем свидетели на катастрофа."; drive = 3; } else if (teams[i].Drive == DriveType.Normal) { input = $"Пилот {pilot.FirstName} от отборът на {teamRace.Name}, продължава с едно чудестно представяне."; drive = 2; } else { input = $"Пилот {pilot.FirstName} от отборът на {teamRace.Name}, продължава с плахото шофиране. Очаквах повече от този пилот " + $"Дано навигатор до него {navigator.FirstName} даде малко смелост да натисне педала."; drive = 1; } } raceHistory.AddHistory(input); var random = RandomEvents(pilot, navigator, runway.Difficulty, drive); if (random == "the end") { input = $"Мик невнимание и пилота {pilot.FirstName} изпусна завоя, колата се преобърна в канавката. Дано всички са наред. " + $"Това беше края на състезанието за отбор: {teamRace.Name}"; var date = new DateTime(); ratingList.AddInRatingList(teamRace, date); crashed.Add(teams[i]); } else if (random == "Ok") { input = $"Без проблеми отборрът на {teamRace.Name} с {pilot.FirstName} зад волана и навигатор до него {navigator.FirstName}" + $"преминаха през втората контрола"; var turbo = cars.GetTurbo(teamRace.User); if (turbo != null && teams[i].UseOfTurboType == UseOfTurboType.Medium) { var speed = (cars.GetMaxCurrentSpeed(teamRace.User) + cars.GetTurbo(teamRace.User).Speed) / 60; //to convene in km / h double time = (double)stages / (double)speed; var date = new DateTime(); var realTime = date.AddMinutes(time); ratingList.AddInRatingList(teamRace, realTime); } else { var speed = cars.GetMaxCurrentSpeed(teamRace.User) / 60; //to convene in km / h double time = (double)stages / (double)speed; var date = new DateTime(); var realTime = date.AddMinutes(time); ratingList.AddInRatingList(teamRace, realTime); } } else { input = $"Пилота {pilot.FirstName} от отбора на {teamRace.Name}, се разсея за момент и излезе от идеалната линия. Това му костваше цени секунди"; var turbo = cars.GetTurbo(teamRace.User); if (turbo != null && teams[i].UseOfTurboType == UseOfTurboType.Medium) { var speed = (cars.GetMaxSpeed(teamRace.User) + cars.GetTurbo(teamRace.User).Speed) / 60; //to convene in km / h double time = (double)stages / (double)speed; var date = new DateTime(); var realTime = date.AddMinutes(time).AddSeconds(double.Parse(random)); ratingList.AddInRatingList(teamRace, realTime); } else { var speed = cars.GetMaxSpeed(teamRace.User) / 60; //to convene in km / h double time = (double)stages / (double)speed; var date = new DateTime(); var realTime = date.AddMinutes(time).AddSeconds(double.Parse(random)); ratingList.AddInRatingList(teamRace, realTime); } } raceHistory.AddHistory(input); pilots.DecreaseEnergy(pilot.Id, 100 - (int)energyPilot); pilots.IncreaseExperience(pilot.Id, numberStage); //2 comes from the number of Stage - stageTwo navigators.DecreaseEnergy(navigator.Id, 100 - (int)energyNavigator); navigators.IncreaseExperience(navigator.Id, numberStage); //2 comes from the number of Stage - stageTwo cars.Damage(teamRace.CarId, numberStage, runway.Difficulty); //2 comes from the number of Stage - stageTwo } }
public CarManager(ICarDal carDal, ICarServices carServices) { _carDal = carDal; _carServices = carServices; }
public CarAdminController(ICarServices carServices) { this.carServices = carServices; }
public CarController(ICarServices cars) { this.cars = cars; }
public CarController(ICarServices carServices, ILogger <CarController> logger) { _carServices = carServices; _logger = logger; }
public CarController(ICarServices car) { _carservices = car; }
/// <summary> /// Public constructor to initialize car service instance /// </summary> public CarsController() { _carServices = new CarServices(); }
public CarsController(ICarServices cars, IPartsServices parts, ILogServices logs) { this.cars = cars; this.parts = parts; this.logs = logs; }
public CarsController(ICarServices cars, IPartService parts) { this.cars = cars; this.parts = parts; }
public ProfileController(IUserServices userServices, ICarServices carServices, IStatisticsServices statisticsServices) { this.userServices = userServices; this.carServices = carServices; this.statisticsServices = statisticsServices; }
public CarsController(ICarServices carServices) { _carServices = carServices; }
public Program(ICarServices carservices) { this.carservices = carservices; }
public CarsController(ICarServices services) { this._services = services; }
static void GetProxy(ICarServices proxy) { Console.WriteLine(proxy.ShowFuel()); Console.WriteLine(proxy.ShowLocation()); }
public CarfunctionController(ICarServices carservice) { this.carservices = carservice; }
public RepairController(IMapper mapper, ICarServices carServices, IRepairServices repairServices) { this.mapper = mapper; this.repairServices = repairServices; }
public DriverServices(BookingCarDbContext context, ICarServices carServices) : base(context) { _carServices = carServices; }
public MarketServices(ApplicationDbContext dbContext, IMoneyAccountServices moneyAccount, ICarServices car) { this.dbContext = dbContext; money = moneyAccount; this.cars = car; }