public HomeController(ILogger <HomeController> logger, IWebsiteAnalyzer websiteAnalyzer, IWebsiteService websiteService) { _logger = logger; _websiteAnalyzer = websiteAnalyzer; _websiteService = websiteService; }
/// <summary> /// Initializes a new instance of the <see cref="WebsiteController" /> class. /// </summary> /// <param name="loggerService">The logger service.</param> /// <param name="websiteService">The website service.</param> public WebsiteController( ILoggerService loggerService, IWebsiteService websiteService) : base(loggerService) { this.websiteService = websiteService; }
public MatchesBase(IInternalService internalService, IWebsiteService website, IMatchesTabService matchesTab, GameMode matchGameMode, MatchesTab currentTab) : base(internalService) { Website = website; MatchesTabService = matchesTab; MatchGameMode = matchGameMode; CurrentTab = currentTab; ShowMatchSummaryButtonEnabled = true; SeasonList.Add("Lifetime"); SeasonList.AddRange(HeroesHelpers.Seasons.GetSeasonList()); SelectedSeasonOption = SeasonList[0]; GameTimeList = HeroesHelpers.GameDates.GameTimeList; SelectedGameTimeOption = GameTimeList[0]; GameDateList = HeroesHelpers.GameDates.GameDateList; SelectedGameDateOption = GameDateList[0]; MapsList.Add("Any"); MapsList.AddRange(HeroesIcons.MapBackgrounds().GetMapsList()); SelectedMapOption = MapsList[0]; ReplayBuildsList.Add("Any"); ReplayBuildsList.AddRange(HeroesHelpers.Builds.GetBuildsList(HeroesIcons)); SelectedBuildOption = ReplayBuildsList[0]; HeroesList.Add("Any"); HeroesList.AddRange(HeroesIcons.Heroes().GetListOfHeroes(HeroesIcons.GetLatestHeroesBuild())); SelectedCharacter = HeroesList[0]; Messenger.Default.Register <MatchesDataMessage>(this, (message) => ReceivedMatchSearchData(message)); Messenger.Default.Register <NotificationMessage>(this, async(message) => await ReceivedMessageAsync(message)); }
public InternalService(IDatabaseService database, IHeroesIconsService heroesIcons, ISelectedUserProfileService userProfile, IWebsiteService website) { Database = database; HeroesIcons = heroesIcons; UserProfile = userProfile; Website = website; }
public HomeController(ILogger <HomeController> logger, IScraperService scraperService, ISearchTermService searchTermService, ISearchEngineService searchEngineService, IWebsiteService website) { _logger = logger; _scraperService = scraperService; _searchTermService = searchTermService; _searchEngineService = searchEngineService; _website = website; }
public MatchPlayerBase(IInternalService internalService, IWebsiteService website, ReplayMatchPlayer player) { Database = internalService.Database; HeroesIcons = internalService.HeroesIcons; UserProfile = internalService.UserProfile; Website = website; Player = player; }
public WebPageController(IWebsiteService websiteService, IWebPageService webPageService, ISectionService sectionService, IWorkContext workContext, IWebHelper webHelper, ILogger <WebPageController> logger) { _websiteService = websiteService; _webPageService = webPageService; _sectionService = sectionService; _workContext = workContext; _webHelper = webHelper; _logger = logger; }
public PagesScrapperService(IHtmlScrapper htmlScrapper, IWebsiteService websiteService, IWebsitesRepository websiteRepository, IMapper mapper) { _htmlScrapper = htmlScrapper; _websiteService = websiteService; _websiteRepository = websiteRepository; _mapper = mapper; }
public TrackingController(IAppUserSessionService appUserSessionService, IUserWebsiteService userWebsiteService, IWebsiteService websiteService, ITrackingRecordService trackingRecordService, IGenericService <PricePosition> pricePositionService, IHtmlLoaderService htmlLoaderService) { this.appUserSessionService = appUserSessionService; this.userWebsiteService = userWebsiteService; this.websiteService = websiteService; this.trackingRecordService = trackingRecordService; this.pricePositionService = pricePositionService; this.htmlLoaderService = htmlLoaderService; }
public void AddAsync_IsWebsiteNameUnique_ReturnsNotUniqueException() { using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); Assert.CatchAsync(typeof(NotUniqueException), async() => await websiteService.AddAsync(websiteAddModel), "Should return ArgumentNullException."); }
public HomeController(IServiceProvider serviceProvider) : base(serviceProvider) { _userService = serviceProvider.GetService <IUserService>(); _userSessionService = serviceProvider.GetService <IUserSessionService>(); websiteService = serviceProvider.GetService <IWebsiteService>(); languageService = serviceProvider.GetService <ILanguageService>(); languageCookieService = serviceProvider.GetService <ILanguageCookieService>(); emailService = serviceProvider.GetService <IEmailService>(); uI_NoticeService = serviceProvider.GetService <IUI_NoticeService>(); }
public void DeleteAsync_ThrowsNotFoundException() { using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); Assert.CatchAsync(typeof(NotFoundException), async() => await websiteService.DeleteAsync(Guid.Parse("4e7a04d2-b0a1-4dbd-9b4e-8b326c272565")), "Should return NotFoundException."); }
public void DeleteAsync_ThrowsArgumentNullException() { using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); Assert.CatchAsync(typeof(ArgumentNullException), async() => await websiteService.DeleteAsync(Guid.Empty), "Should return ArgumentNullException."); }
public MatchHistoryMatch(IInternalService internalService, IWebsiteService website, ReplayMatch replayMatch) { InternalService = internalService; HeroesIcons = internalService.HeroesIcons; UserProfile = internalService.UserProfile; Website = website; ReplayMatch = replayMatch; SetMatch(); }
public ExternalSiteContentController( IReadOnlyPolicyRegistry <string> policyRegistry, IWebsiteService websiteService, ISentimentAnalysisService sentimentAnalysisService, ILogger <ExternalSiteContentController> logger) { _policy = policyRegistry.Get <IAsyncPolicy <AnalysisResponse> >(Policies.AnalysisResponsePolicy); _websiteService = websiteService; _sentimentAnalysisService = sentimentAnalysisService; _logger = logger; }
public MatchPlayerBase(IInternalService internalService, IWebsiteService website, ReplayMatchPlayer player) { Database = internalService.Database; HeroesIcons = internalService.HeroesIcons; UserProfile = internalService.UserProfile; Website = website; Player = player; SilenceIcon = HeroesIcons.GetOtherIcon(OtherIcon.Silence); TalentBorderScoreScreenIcon = HeroesIcons.GetOtherIcon(OtherIcon.TalentAvailable); }
public GlobalController(IServiceProvider serviceProvider) { websiteService = serviceProvider.GetService <IWebsiteService>(); languageService = serviceProvider.GetService <ILanguageService>(); languageCookieService = serviceProvider.GetService <ILanguageCookieService>(); httpContextAccessor = serviceProvider.GetService <IHttpContextAccessor>(); websiteCookieService = serviceProvider.GetService <IWebsiteCookieService>(); cacheService = serviceProvider.GetService <ICacheService>(); defaultLanguage = serviceProvider.GetService <IOptions <Language> >().Value; LoadWebsite(); }
public LoginViewModel(IConnectionService connectionService, ISettingsService settingsService, INavigationService navigationService, IAuthenticationService authenticationService, IDialogService dialogService, IWebsiteService websiteService) : base(connectionService, navigationService, dialogService) { _authenticationService = authenticationService; _settingsService = settingsService; _websiteService = websiteService; _mobileNo = settingsService.UserMobileSetting ?? string.Empty; }
public GlobalController(IServiceProvider serviceProvider) { websiteService = serviceProvider.GetService <IWebsiteService>(); languageService = serviceProvider.GetService <ILanguageService>(); languageCookieService = serviceProvider.GetService <ILanguageCookieService>(); httpContextAccessor = serviceProvider.GetService <IHttpContextAccessor>(); websiteCookieService = serviceProvider.GetService <IWebsiteCookieService>(); actionContextAccessor = serviceProvider.GetService <IActionContextAccessor>(); webHostEnvironment = serviceProvider.GetService <IWebHostEnvironment>(); urlControlHelper = serviceProvider.GetService <UrlControlHelper>(); LoadWebsite(); }
public async Task DeleteAsync_SetsTrue() { using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); await websiteService.DeleteAsync(websiteToDeleteId); bool isDeleted = (await context.Websites.IgnoreQueryFilters().Select(x => new { x.Id, x.IsDeleted }).FirstOrDefaultAsync(x => x.Id == websiteToDeleteId)).IsDeleted; Assert.IsTrue(isDeleted, "IsDeleted should be set to true."); }
public Seeder( IDataInitializer dataInitializer, IIdentityService identityService, IWebsiteService websiteService, IIdentityRepository identityRepository, IConfigurationRoot configuration) { _dataInitializer = dataInitializer; _identityService = identityService; _websiteService = websiteService; _identityRepository = identityRepository; _configuration = configuration; }
public async Task AddAsync_CreatesWebsite() { using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); websiteAddModel.Name = "A dd Async"; Guid id = await websiteService.AddAsync(websiteAddModel); Assert.AreNotEqual(id, Guid.Empty, "Add async should return a GUID."); }
public PageController( IPageService pageService, IPageBackgroundService pageBackService, IWebsiteService websiteService, IWebsiteTextService websiteTextService, IMapper mapper) { _pageService = pageService; _pageBackService = pageBackService; _mapper = mapper; _websiteService = websiteService; _websiteTextService = websiteTextService; }
public HomeViewModel(IInternalService internalService, IWebsiteService website) : base(internalService) { Website = website; UserBattleTagUpdated = false; LatestReplayDateTime = DateTime.MinValue; Messenger.Default.Register <NotificationMessage>(this, (message) => ReceivedMessage(message)); InitialMatchHistoryLoad(); InitDynamicMatchLoading(); }
public MatchPlayerBase(IInternalService internalService, IWebsiteService website, ReplayMatchPlayer player, int build) { Database = internalService.Database; HeroesIcons = internalService.HeroesIcons; UserProfile = internalService.UserProfile; Website = website; Player = player; Build = build; SilenceIcon = ImageStreams.OtherIconImage(OtherIcon.Silence); VoiceSilenceIcon = ImageStreams.OtherIconImage(OtherIcon.VoiceSilence); TalentBorderScoreScreenIcon = ImageStreams.OtherIconImage(OtherIcon.TalentAvailable); BoostIcon = ImageStreams.OtherIconImage(OtherIcon.Boost); }
public static void UpdatePage(this IWebsiteService websiteService, string path, Action <Page> update) { if (websiteService == null) { throw new ArgumentNullException("websiteService"); } if (update == null) { throw new ArgumentNullException("update"); } using (var writer = websiteService.CreateWriter()) { update(writer.Resource.FindPage(path)); } }
public MatchSummaryViewModel(IInternalService internalService, IWebsiteService website, ILoadingOverlayWindowService loadingOverlayWindow) : base(internalService) { Website = website; LoadingOverlayWindow = loadingOverlayWindow; IsFlyoutLoadingOverlayVisible = false; IsLeftChangeButtonVisible = true; IsRightChangeButtonVisible = true; IsLeftChangeButtonEnabled = false; IsRightChangeButtonEnabled = false; ScoreKillIcon = ImageStreams.OtherIconImage(OtherIcon.Kills); ScoreAssistIcon = ImageStreams.OtherIconImage(OtherIcon.Assist); ScoreDeathIcon = ImageStreams.OtherIconImage(OtherIcon.Death); ScoreSiegeDamageIcon = ImageStreams.OtherIconImage(OtherIcon.SiegeDamage); ScoreHeroDamageIcon = ImageStreams.OtherIconImage(OtherIcon.HeroDamage); ScoreHealingAbsorbedIcon = ImageStreams.OtherIconImage(OtherIcon.HealAbsorbedDamage); ScoreSelfHealingIcon = ImageStreams.OtherIconImage(OtherIcon.SelfHealing); ScoreDamageTakenIcon = ImageStreams.OtherIconImage(OtherIcon.DamageTaken); ScoreExperienceContributionIcon = ImageStreams.OtherIconImage(OtherIcon.ExperienceContribution); BlueKillsIcons = ImageStreams.OtherIconImage(OtherIcon.KillsBlue); RedKillsIcons = ImageStreams.OtherIconImage(OtherIcon.KillsRed); LeftArrowDisabledIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowLeftDisabled); LeftArrowDownIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowLeftDown); LeftArrowHoverIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowLeftHover); LeftArrowNormalIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowLeftNormal); RightArrowDisabledIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowRightDisabled); RightArrowDownIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowRightDown); RightArrowHoverIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowRightHover); RightArrowNormalIcon = ImageStreams.OtherIconImage(OtherIcon.LongarrowRightNormal); HasBans = false; HasObservers = false; HasChat = false; TeamLevelTimeGraph = new TeamLevelTimeGraph(); TeamExperienceGraph = new TeamExperienceGraph(Database); StatGraphs = new StatGraphs(Database); Messenger.Default.Register <NotificationMessage>(this, (message) => ReceivedMessage(message)); SimpleIoc.Default.Register <IMatchSummaryReplayService>(() => this); }
public void SetUp() { options = new DbContextOptionsBuilder <DataContext>() .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) .Options; using var context = new DataContext(options); var mc = new MemoryCache(new MemoryCacheOptions()); var categoryService = new CategoryService(context, mc); context.Categories.Add(new Category { Code = CategoryCode.Sport, Name = "Sport" }); context.SaveChanges(); websiteService = new WebsiteService(context, categoryService, new UserService(new PasswordService())); websiteToDeleteId = Task.Run(() => websiteService.AddAsync(websiteAddModel)).GetAwaiter().GetResult(); }
public PageBackgroundService( IWebsiteService websiteService, IWebsiteTextService websiteTextService, IPageService pageService, IEmailService emailService, IUserService userService, IHtmlDifferenceService differenceService, IConfiguration config, IPageDifferenceService pageDifferenceService) { _websiteService = websiteService; _pageService = pageService; _emailService = emailService; _userService = userService; _differenceService = differenceService; _config = config; _websiteTextService = websiteTextService; _pageDifferenceService = pageDifferenceService; }
/// <summary> /// Initializes a new instance of the <see cref="WebsiteController" /> class. /// </summary> /// <param name="loggerService">The logger service.</param> /// <param name="websiteService">The website service.</param> /// <param name="displayNameService">The display name service.</param> /// <param name="testService">The test service.</param> /// <param name="suiteService">The suite service.</param> /// <param name="schedulerService">The Scheduler service.</param> /// <param name="sharedTestService">The shared test service.</param> /// <param name="dataBaseCategoriesService">The data base Categories service.</param> public WebsiteController( ILoggerService loggerService, IWebsiteService websiteService, IPagesService displayNameService, ITestService testService, ISuiteService suiteService, ISchedulerService schedulerService, ISharedTestService sharedTestService, IDataBaseCategoriesService dataBaseCategoriesService) : base(loggerService) { this.websiteService = websiteService; this.displayNameService = displayNameService; this.testService = testService; this.suiteService = suiteService; this.schedulerService = schedulerService; this.sharedTestService = sharedTestService; this.dataBaseCategoriesService = dataBaseCategoriesService; }
public BookmarksService(IDeletableRepository<Bookmark> bookmarks, ITagsService tagService, IWebsiteService websiteService) { this.bookmarks = bookmarks; this.tagService = tagService; this.websiteService = websiteService; }
public PageController(IWebsiteService websiteService) { this.websiteService = websiteService; }
public ContentController(IWebsiteService websiteService) { this.websiteService = websiteService; }
public WebsitesController(IWebsiteService websites) { this.websites = websites; }
public ConfigurationController(IWebsiteService websiteService, IResourceService<Authorizer, IReadOnlyAuthorizer> authService) { this.websiteService = websiteService; this.authService = authService; }