//Opstellen incidentenTabel private async Task <int> IncidentenTabel(IHomeRepository repo, IEnumerable <Home> filtered) { // Het aanpassen van de NULL string naar Not Set omdat het mooier oogt in de tabel // Ophalen van alle impacts uit de repository/db this._RemoveNullImp = repo.getSupportCallImpacts(); // de Index achterhalen van null int index = _RemoveNullImp.IndexOf("NULL"); // Index is -1 als NULL niet voorkomt in de array, als dit niet zo is, dan zit hij er ergens in en dan vervangen we hem if (index != -1) { _RemoveNullImp[index] = "Not Set"; } //Idem voor urgenties _RemoveNullUrg = repo.getSupportCallUrgencies(); int index2 = _RemoveNullUrg.IndexOf("NULL"); if (index2 != -1) { _RemoveNullUrg[index2] = "Not Set"; } // Verzamelen van alle nodige data voor de tabel samen te steken //(mogelijke impacts, mogelijke urgenties en de totale aantal per categorie) impacts = _RemoveNullImp; urgenties = _RemoveNullUrg; prioriteiten = repo.GetIncidentenTable(filtered); return(4); }
public HomeService( IHomeRepository homeRepository, IMapper mapper) { this._homeRepository = homeRepository; this._mapper = mapper; }
/// <summary> /// Creates a new instance of <see cref="TypedSearchItemViewModelFactory"/> class. /// </summary> /// <param name="calculationService">Service for price calculations.</param> /// <param name="pageUrlRetriever">Retriever for page URLs.</param> /// <param name="homeRepository">Repository representing home page sections.</param> /// <param name="aboutUsRepository">Repository representing about us stories.</param> public TypedSearchItemViewModelFactory(ICalculationService calculationService, IPageUrlRetriever pageUrlRetriever, IHomeRepository homeRepository, IAboutUsRepository aboutUsRepository) { this.calculationService = calculationService; this.pageUrlRetriever = pageUrlRetriever; this.homeRepository = homeRepository; this.aboutUsRepository = aboutUsRepository; }
private HomeForm() { InitializeComponent(); this.homePresenter = new HomePresenter(this); homeRep = new HomeRepository(); }
public void Test1() { var data = DataList(); var mockSet = new Mock <DbSet <Home> >(); mockSet.As <IAsyncEnumerable <Home> >() .Setup(m => m.GetEnumerator()) .Returns(new TestAsyncEnumerator <Home>(data.GetEnumerator())); mockSet.As <IQueryable <Home> >() .Setup(m => m.Provider) .Returns(new TestAsyncQueryProvider <Home>(data.Provider)); mockSet.As <IQueryable <Home> >().Setup(m => m.Expression).Returns(data.Expression); mockSet.As <IQueryable <Home> >().Setup(m => m.ElementType).Returns(data.ElementType); _context = new Mock <IBookingContext>(); _context.Setup(c => c.Homes).Returns(mockSet.Object); _repo = new HomeRepository(_context.Object); var homes = _repo.GetHomesByOwner(1, new PagingParameters()); Assert.AreEqual(5, homes.Result.Value.Count); }
public virtual MailLogDTO SendMail(Domain.Entity.Client currentClient, MailModel entity, object param) { List <string> recipients = new List <string>(); List <Document> documents = new List <Document>(); MailLog mailLog; ValidateNull(entity); if (!validation.PreValidatePost(validationDictionnary, currentClient, entity, param, repo, recipients, documents)) { throw new ManahostValidationException(validationDictionnary); } IHomeRepository homeRepo = ((MailController.AdditionalRepositories)param).HomeRepo; MailConfig mailconfig = repo.GetMailConfigById(entity.MailConfigId, currentClient.Id); Mailling.SendMailBcc(new InfosMailling(mailconfig.Smtp, (int)mailconfig.SmtpPort, mailconfig.Email, homeRepo.GetHomeById(mailconfig.HomeId, currentClient.Id).Title, Encoding.UTF8.GetString(Convert.FromBase64String(entity.Password))) { body = entity.Body, prio = System.Net.Mail.MailPriority.Normal, subject = entity.Subject, toPeople = recipients, ssl = (bool)mailconfig.IsSSL, attachments = MailUtils.GetAttachments(documents, mailconfig.Home) }, mailLog = new MailLog() { DateSended = DateTime.UtcNow, To = String.Join(",", recipients.ToArray()), Successful = true, HomeId = mailconfig.HomeId }); repo.Add <MailLog>(mailLog); return(GetMapper.Map <MailLog, MailLogDTO>(mailLog)); }
public AdminController(IHomeRepository repo, UserManager <User> userManager, SignInManager <User> signInManager) { this.userManager = userManager; this.signInManager = signInManager; repository = repo; }
public override void SetRepositories() { _MasterRepo.NetworkInterface = (U, P, A) => ExecuteQueryWithObjectAndNetworkAccessAsync(U, P, A); _MasterRepo.NetworkInterfaceWithTypedParameters = (U, P, A) => ExecuteQueryWithTypedParametersAndNetworkAccessAsync(U, P, A); _Service = new HomeService(_MasterRepo.NetworkInterface); _Reposetory = new HomeRepository(_MasterRepo, _Service); }
public AgentController(IHomeRepository homeRepository, IMapper mapper, IFileManager fileManager, ICategoryyRepository categoryyRepository) { _homeRepository = homeRepository; _mapper = mapper; _fileManager = fileManager; _categoryyRepository = categoryyRepository; }
public HomeService() { _index = new IndexRepository(dbContext); _home = new HomeRepository(dbContext); _video = new VideoRepository(dbContext); _Topic = new TopicRepository(dbContext); }
public HomeService(IInformationRepository informationRepository, IUserRepository userRepository, IUserInformationRepository userInformationRepository, IConfiguration config, IMailService mailService, IHomeRepository homeRepository, IFCMService fcmService, IFriendshipRepository friendshipRepository, IShoppingListRepository shoppingListRepository, INotepadRepository notepadRepository, IExpenseRepository expenseRepository, IUserExpenseRepository userExpenseRepository) { _informationRepository = informationRepository; _userRepository = userRepository; _userInformationRepository = userInformationRepository; _config = config; _mailService = mailService; _homeRepository = homeRepository; _fcmService = fcmService; _friendshipRepository = friendshipRepository; _shoppingListRepository = shoppingListRepository; _notepadRepository = notepadRepository; _expenseRepository = expenseRepository; _userExpenseRepository = userExpenseRepository; }
public ClientBusiness(IClientRepository clientsRepository, IHomeRepository homeRepository, IMapper mapper) { _clientsRepository = clientsRepository; _homeRepository = homeRepository; _mapper = mapper; }
public HomeController(IHomeRepository repository, ICurrencyRatesService currencyRate, IYouTubeService youTube) { _repository = repository; _currencyRate = currencyRate; _youTube = youTube; }
public HomeController(IWebHostEnvironment hostingEnvironment, IHomeRepository homeRepository, UserManager <ApplicationUser> userManager) { _hostingEnvironment = hostingEnvironment; _homeRepository = homeRepository; _userManager = userManager; }
public HomeController(IPromotedContentRepository repository, IHomeRepository homeRepository, IOutputCacheDependencies outputCacheDependencies) { mHighlightRepository = repository; mHomeRepository = homeRepository; mOutputCacheDependencies = outputCacheDependencies; }
public HomeController(IPageRepository PageRepo, IHomeRepository HomeRepo, IImageRepository ImageRepo, IFormRepository FormRepo, IFAQRepository FAQRepo, IBlogPostRepository BlogPostRepo) { PageRepository = PageRepo; HomeRepository = HomeRepo; ImageRepository = ImageRepo; FormRepository = FormRepo; FAQRepository = FAQRepo; BlogPostRepository = BlogPostRepo; }
public HomeController(IPromotedContentRepository repository, IHomeRepository homeRepository, IOutputCacheDependencies outputCacheDependencies, IContactTrackingService contactTrackingService) { mHighlightRepository = repository; mHomeRepository = homeRepository; mOutputCacheDependencies = outputCacheDependencies; mContactTrackingService = contactTrackingService; }
public ShoppingListService(IShoppingListRepository shoppingListRepository, IUserRepository userRepository, IFCMService fcmService, IHomeRepository homeRepository) { _shoppingListRepository = shoppingListRepository; _userRepository = userRepository; _fcmService = fcmService; _homeRepository = homeRepository; }
public static String GetEncryptionPassword(IHomeRepository homeRepo, Client currentClient) { if (currentClient != null) { Home home = homeRepo.GetHomeById((int)currentClient.DefaultHomeId, currentClient.Id); return(home.EncryptionPassword); } return(null); }
public HouseworkService(IFCMService fcmService, IUserRepository userRepository, IHomeRepository homeRepository, IHouseworkRepository houseworkRepository) { _fcmService = fcmService; _userRepository = userRepository; _homeRepository = homeRepository; _houseworkRepository = houseworkRepository; }
public BlogController(IHomeRepository homeRepository, ICategoryyRepository categoryRepository, IMapper mapper, IBlogRepository blogRepository) { _categoryRepository = categoryRepository; _homeRepository = homeRepository; _mapper = mapper; _blogRepository = blogRepository; }
public HomeController(ICurrentUserAccessor currentUserAccessor, ICategoryRepository categoryRepository, ICourseRepository courseRepository, ILessonRepository lessonRepository, IHomeRepository homeRepository, ITopicRepository topicRepository) { _currentUserAccessor = currentUserAccessor; _categoryRepository = categoryRepository; _courseRepository = courseRepository; _lessonRepository = lessonRepository; _homeRepository = homeRepository; _topicRepository = topicRepository; }
// De methode die alle voorgaande methoden oproept om deze async uit te laten voeren. private async void workAsync(IHomeRepository repo, IEnumerable <Home> filtered) { Task <int> TaskOne = PieChart(repo, filtered); Task <int> TaskFour = IncidentenTabel(repo, filtered); AantalPerCategorie(repo, filtered); GroupTable(repo, filtered); int result = await TaskOne; int result2 = await TaskFour; }
public HomePresenter(IHomeView view) { _homeForm = view; _homeModel = new HomeModel(); _homeRepository = new HomeRepository(); _homeForm.LoadHome += Load_Home; _homeForm.SaveInfo += SaveInfo; _homeForm.VerifyInfoName += VerifyInfoName; _homeForm.VerifyIncrement += VerifyIncrement; _homeForm.VerifyDistance += VerifyDistance; _homeForm.VerifyInfoSite += VerifyInfoSite; }
public DataManager(IHomeRepository homeRepository, IAccountRepository accountRepository, IServiceItemsRepository serviceItemsRepository, ITextFieldsRepository textFieldsRepository, IUserService userService ) { HomeRepository = homeRepository; AccountRepository = accountRepository; ServiceItemsRepository = serviceItemsRepository; UserService = userService; TextFields = textFieldsRepository; }
public async Task <IActionResult> GetSummaryStats([FromServices] IHomeRepository data) { string cacheKey = "sumStats"; SummaryStats ssData; bool cacheExists = _cache.TryGetItem(cacheKey, _lastUpdated, out ssData); if (!cacheExists) { ssData = await data.GetSummaryAsync(); _cache.AddItem(cacheKey, _lastUpdated, ssData); } return(Content(JsonConvert.SerializeObject(ssData), "application/json")); }
public HomeController(IPageDataContextRetriever pageDataContextRetriever, IHomeRepository homeSectionRepository, IReferenceRepository referenceRepository, IOutputCacheDependencies outputCacheDependencies, IPageUrlRetriever pageUrlRetriever, IPageAttachmentUrlRetriever attachmentUrlRetriever) { this.pageDataContextRetriever = pageDataContextRetriever; this.homeSectionRepository = homeSectionRepository; this.referenceRepository = referenceRepository; this.pageUrlRetriever = pageUrlRetriever; this.outputCacheDependencies = outputCacheDependencies; this.attachmentUrlRetriever = attachmentUrlRetriever; }
public FCMService(IInformationRepository informationRepository, IUserRepository userRepository, IUserInformationRepository userInformationRepository, IConfiguration config, IMailService mailService, IHomeRepository homeRepository) { _informationRepository = informationRepository; _userRepository = userRepository; _userInformationRepository = userInformationRepository; _config = config; _mailService = mailService; _homeRepository = homeRepository; }
public MenuService(IMenuRepository menuRepository, IMealRepository mealRepository, IMenuMealRepository menuMealRepository, IHomeRepository homeRepository, IUserRepository userRepository, IFCMService fcmService) { _mealRepository = mealRepository; _menuRepository = menuRepository; _menuMealRepository = menuMealRepository; _userRepository = userRepository; _homeRepository = homeRepository; _fcmService = fcmService; }
// De repository, de gefilterde objecten en de filter zelf zijn vereist. De repo voor de methoden de andere voor de data die ze bevatten public GraphsViewModel(IHomeRepository repo, IEnumerable <Home> filtered, Home filter) { #region Injectie this._filter = filter; filterAsString = filter.ToString() == null ? "" : filter.ToString(); #endregion //Deze async werd toegevoegd om te proberen van de pdf beter te laten werken maar ondertussen werd al ondekt dat de oorzaak hiervan niet in // de code ligt. Wel aan .net core 2.0 try { workAsync(repo, filtered); } catch (Exception e) { throw new Exception("Er ging iets fout, mogelijks is uw sessie verlopen."); } }
public AuthenticationService(IInformationRepository informationRepository, IUserRepository userRepository, IUserInformationRepository userInformationRepository, IConfiguration config, IMailService mailService, IJwtTokenService jwtTokenService, IFriendshipRepository friendshipRepository, IHomeRepository homeRepository) { _informationRepository = informationRepository; _userRepository = userRepository; _userInformationRepository = userInformationRepository; _config = config; _mailService = mailService; _jwtTokenService = jwtTokenService; _friendshipRepository = friendshipRepository; _homeRepository = homeRepository; }
public HomeService(IHomeRepository homeRepository) { this.HomeRepository = homeRepository; }
public static String GetEncryptionPassword(IHomeRepository homeRepo, Client currentClient) { if (currentClient != null) { Home home = homeRepo.GetHomeById((int)currentClient.DefaultHomeId, currentClient.Id); return home.EncryptionPassword; } return null; }
public HomeBLL(IHomeRepository homeRepository) { this.HomeRepository = homeRepository; }