public LinkViewModel(Thing linkThing, IBaconProvider baconProvider, bool? wasStreamed = null) { _linkThing = new TypedThing<Link>(linkThing); _baconProvider = baconProvider; _redditService = _baconProvider.GetService<IRedditService>(); _navigationService = _baconProvider.GetService<INavigationService>(); _imagesService = _baconProvider.GetService<IImagesService>(); _dynamicViewLocator = _baconProvider.GetService<IDynamicViewLocator>(); _settingsService = _baconProvider.GetService<ISettingsService>(); _isPreviewShown = false; _isExtendedOptionsShown = false; _loading = false; _registeredLongNav = false; ShowPreview = new RelayCommand(() => IsPreviewShown = !IsPreviewShown); ShowExtendedOptions = new RelayCommand(() => IsExtendedOptionsShown = !IsExtendedOptionsShown); WasStreamed = wasStreamed ?? false; ContentIsFocused = !WasStreamed; if (Url != null) { if (_imagesService.MightHaveImagesFromUrl(Url) && !Url.EndsWith(".jpg") && !Url.EndsWith(".gif") && !Url.EndsWith(".png")) { MessengerInstance.Register<LongNavigationMessage>(this, OnLongNav); _registeredLongNav = true; } } }
public ProjectsController(IProjectsService projects, IUsersService users, IImagesService images, IPublisher publisher) { this.projects = projects; this.users = users; this.images = images; this.publisher = publisher; }
public HomeController( IConfiguration configuration, ICategoriesService categoriesService, IImagesService imagesService) { this.Configuration = configuration; this.CategoriesService = categoriesService; this.ImagesService = imagesService; }
public ImagesController( IImagesService imagesService, IHostingEnvironment hostingEnvironment, IMapper mapper) { _imagesService = imagesService ?? throw new ArgumentNullException(nameof(imagesService)); _hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public MainViewModel( ScripturesViewModel scripturesViewModel, PreviewViewModel previewViewModel, SettingsViewModel settingsViewModel, EditTextViewModel editVerseTextViewModel, StartupViewModel startupViewModel, IImagesService imagesService, IOptionsService optionsService, ISnackbarService snackbarService, IUserInterfaceService userInterfaceService, ICommandLineService commandLineService, IVerseEditorService verseEditorService) { _scripturesViewModel = scripturesViewModel; _previewViewModel = previewViewModel; _settingsViewModel = settingsViewModel; _editVerseTextViewModel = editVerseTextViewModel; _startupViewModel = startupViewModel; _commandLineService = commandLineService; _verseEditorService = verseEditorService; if (commandLineService.NoGpu || ForceSoftwareRendering()) { // disable hardware (GPU) rendering so that it's all done by the CPU... RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; } _settingsViewModel.EpubChangedEvent += HandleEpubChangedEvent; _previewViewModel.EditTextCommandEvent += HandleEditTextCommandEvent; _imagesService = imagesService; _optionsService = optionsService; _snackbarService = snackbarService; _userInterfaceService = userInterfaceService; _optionsService.AlwaysOnTopChangedEvent += HandleAlwaysOnTopChangedEvent; _optionsService.EpubPathChangedEvent += HandleEpubPathChangedEvent; InitCommands(); _currentPage = scripturesViewModel; _preSettingsPage = scripturesViewModel; if (IsNewInstallation()) { _currentPage = startupViewModel; } else if (IsBadEpubPath()) { _currentPage = settingsViewModel; } _nextPageTooltip = Properties.Resources.NEXT_PAGE_PREVIEW; GetVersionData(); }
public ProductController(IProductServices productServices, IImagesService imagesService, IUserServices userServices, ICloudinaryServices cloudinaryService, IGenreService genreService) { this.productServices = productServices; this.imagesService = imagesService; _userServices = userServices; _cloudinaryService = cloudinaryService; _genreService = genreService; }
public void TestsSetup() { AutoMapperConfig.RegisterMappings(); this.recipesServiceMock = ServicesObjectFactory.GetRecipeService(); this.imagesServiceMock = ServicesObjectFactory.GetRecipeImagesService(); this.articlesServiceMock = ServicesObjectFactory.GetArticlesService(); this.controller = new HomeController(this.imagesServiceMock, this.recipesServiceMock, this.articlesServiceMock); }
public AlbumsController( IAlbumsService albumsService, ITagsService tagsService, IImagesService imagesService) { this.albumsService = albumsService; this.tagsService = tagsService; this.imagesService = imagesService; }
public RequestsController( IRequestsService requestsService, IUsersService usersService, IImagesService imagesService) { this.requestsService = requestsService; this.usersService = usersService; this.imagesService = imagesService; }
public VotesController( UserManager <ApplicationUser> userManager, IVotesService votesService, IImagesService imagesService) { this.UserManager = userManager; this.VotesService = votesService; this.ImagesService = imagesService; }
public DefaultMediaManagerApiOperations(IMediaTreeService mediaTree, IImagesService images, IImageService image, IFilesService files, IFileService file) { MediaTree = mediaTree; Images = images; Image = image; Files = files; File = file; }
public ImagesController(IImagesService imagesService, ICashService <Image> cashService, IConfiguration Configuration) { this.imagesService = imagesService; this.cashService = cashService; this.Configuration = Configuration; TimeSpan.TryParse(Configuration["TimeTolive"].Trim(), out timeTolive); }
public ClubsController(IData <Club> dataClub, IData <City> dataCity, IImagesService imagesService, IData <League> dataLeague) { _dataClub = dataClub; _dataCity = dataCity; _imagesService = imagesService; _dataLeague = dataLeague; }
public PostsService( IDeletableEntityRepository <Post> postsRepository, IRepository <PostLike> postLikesRepository, IImagesService imagesService) { this.postsRepository = postsRepository; this.postLikesRepository = postLikesRepository; this.imagesService = imagesService; }
public RequestsService( IDeletableEntityRepository <Request> requestsRepository, IUsersService usersService, IImagesService imagesService) { this.requestsRepository = requestsRepository; this.usersService = usersService; this.imagesService = imagesService; }
public CarsService( IRepository <ApplicationUser> usersRepository, IDeletableEntityRepository <Car> carsRepository, IImagesService imagesService) { this.usersRepository = usersRepository; this.carsRepository = carsRepository; this.imagesService = imagesService; }
public ProductsController( IProductsService productsService, ICommentsService commentsService, IImagesService imagesService) { this.productsService = productsService; this.commentsService = commentsService; this.imagesService = imagesService; }
public HomeController(IOrdersService orders, IBulletinsService bulletin, IImagesService images, IFeedbacksService feedbacks, ILoggerService logger, IConfiguration configuration) { this.orders = orders; this.bulletins = bulletin; this.images = images; this.feedbacks = feedbacks; this.logger = logger; this.configuration = configuration; }
public ImagesServiceTests() { this.InitializeMapper(); this.dbContext = InitializeDbContext(); InitializeRepositories(this.dbContext, out this.imageRepo, out this.imageTypeRepo); this.imagesService = InitializeService(this.imageRepo, this.imageTypeRepo); }
public DataController(IMakesService makesService, IModelsService modelsService, IGenerationsService generationsService, ICarsService carsService, IImagesService imagesService) { this.makesService = makesService; this.modelsService = modelsService; this.generationsService = generationsService; this.carsService = carsService; this.imagesService = imagesService; }
public SelfCommands(DbService db, DiscordSocketClient client, MusicService music, IImagesService images, IBotConfigProvider bc) { _db = db; _client = client; _images = images; _music = music; _bc = bc; }
public ItemController(IData <Item> dataItem, IMapper mapper, IImagesService imagesService, IData <BidsItem> dataBidsItem, UserManager <IdentityUser> userManager) { _dataItem = dataItem; _mapper = mapper; _imagesService = imagesService; _dataBidsItem = dataBidsItem; _userManager = userManager; }
public PlantAndPickService(DiscordSocketClient client, IBotConfigProvider bcp, DbService db, CommandHandler cmdHandler, StringService strings, IImagesService images) { _bcp = bcp; _db = db; _cmdHandler = cmdHandler; _strings = strings; _images = images; client.MessageReceived += PotentialFlowerGeneration; }
public ExperiencesController(IUserFavouritesService userFavouritesService, IRatingService ratingService, ILocationsService locationService, IExperiencesService experiencesService, IImagesService imagesService, UserManager <ApplicationUser> userManager, IWebHostEnvironment env) { this.userFavouritesService = userFavouritesService; this.ratingService = ratingService; this.locationService = locationService; this.experiencesService = experiencesService; this.imagesService = imagesService; this.userManager = userManager; this.env = env; }
public PlayersService( IImagesService imagesService, IRepository <Player> playerRepository, IRepository <Team> teamRepository, IMapper mapper) : base(mapper) { this.imagesService = imagesService; this.playerRepository = playerRepository; this.teamRepository = teamRepository; }
public ProductsProvider(Db.ProductsDbContext dbContext, Interfaces.ICosmosDbService cosmosDbService, Interfaces.IImagesService imagesService, ILogger <ProductsProvider> logger, IMapper mapper) { this._dbContext = dbContext; this._cosmosDbService = cosmosDbService; this._imagesService = imagesService; this._logger = logger; this._mapper = mapper; //SeedData(); }
public ChildCategoriesController(IChildCategoriesService childCategoryService, IParentCategoriesService parentCategoryService, IImagesService imageService, IMapper mapper) { this.childCategoryService = childCategoryService; this.parentCategoryService = parentCategoryService; this.imageService = imageService; this.mapper = mapper; }
public UploadImagesController( IImagesService imagesService, IOptions <ImagesOptions> imagesOptions, IPersonalManager personalManager, IServiceProvider serviceProvider) : base(serviceProvider) { this.imagesService = imagesService; this.imagesOptions = imagesOptions.Value; this.personalManager = personalManager; }
public ProductsController(IProductsService productService, IChildCategoriesService childCategoriesService, IImagesService imageService, IMapper mapper) { this.productService = productService; this.childCategoriesService = childCategoriesService; this.imageService = imageService; this.mapper = mapper; }
public ElectricCarsController( ICarsService carsService, IImagesService imagesService, UserManager <ElectricTravelUser> userManager, IWebHostEnvironment environment) { this.carsService = carsService; this.imagesService = imagesService; this.userManager = userManager; this.environment = environment; }
public DefaultMediaManagerApiOperations(IMediaTreeService mediaTree, IImagesService images, IImageService image, IFilesService files, IFileService file, IFoldersService folders, IFolderService folder) { MediaTree = mediaTree; Folders = folders; Folder = folder; Images = images; Image = image; Files = files; File = file; }
public ImagesApiController( ILog log, IServices services, IRetrievers retrievers, IRepositories repositories) : base(log) { this.imagesRetriever = retrievers.ImagesRetriever; this.imagesService = services.ImagesService; this.imagesRepository = repositories.ImagesRepository; }
public ProductsService( IDeletableEntityRepository <Product> productsRepository, IImagesService imagesService, IDeletableEntityRepository <ProductImage> productImagesRepository, IRepository <UserProductReview> userProductReviewsRepository) { this.productsRepository = productsRepository; this.imagesService = imagesService; this.productImagesRepository = productImagesRepository; this.userProductReviewsRepository = userProductReviewsRepository; }
public AdsController( ICategoriesService categories, IAdvertisementsService advertisements, ITownsService towns, IImagesService images, UserManager<ApplicationUser> manager) { this.categories = categories; this.advertisements = advertisements; this.towns = towns; this.images = images; this.manager = manager; }
public WebImagesService( IImagesService images, IMapPathAdapter serverUtilities, IFileSaverAdapter fileSaver, IDirectoryAdapter directory, IGuidAdapter guid) { this.images = images; this.serverUtilities = serverUtilities; this.fileSaver = fileSaver; this.directory = directory; this.guid = guid; }
public void Initialize(IImagesService imagesService, IOfflineService offlineService, IOOMService oomService, ISettingsService settingsService, ISuspensionService suspensionService, ISmartOfflineService smartOfflineService, ISimpleHttpService simpleHttpService) { _imagesService = imagesService; _offlineService = offlineService; _oomService = oomService; _settingsService = settingsService; _suspensionService = suspensionService; _smartOfflineService = smartOfflineService; _smartOfflineService.OffliningOpportunity += _smartOfflineService_OffliningOpportunity; _oomService.OutOfMemory += _oomService_OutOfMemory; }
public void Initialize(IViewModelContextService viewModelContextService, IOOMService oomService, ISettingsService settingsService, ISuspensionService suspensionService, IDynamicViewLocator dynamicViewLocator, IOfflineService offlineService, IImagesService imagesService, ISystemServices systemServices, ISuspendableWorkQueue suspendableWorkQueue) { _viewModelContextService = viewModelContextService; _oomService = oomService; _settingsService = settingsService; _suspensionService = suspensionService; _dynamicViewLocator = dynamicViewLocator; _offlineService = offlineService; _imagesService = imagesService; _systemServices = systemServices; _suspendableWorkQueue = suspendableWorkQueue; _oomService.OutOfMemory += _oomService_OutOfMemory; }
public ProjectsController( IUsersService usersService, IVisitsService visitsService, IProjectsService projectsService, ITagsService tagsService, IMappingService mappingService, IImagesService imagesService, IDownloadableFilesService downloadableFilesService, IFileSystemService fileSystemService) : base(usersService) { this.visitsService = visitsService; this.projectsService = projectsService; this.tagsService = tagsService; this.mappingService = mappingService; this.imagesService = imagesService; this.downloadableFilesService = downloadableFilesService; this.fileSystemService = fileSystemService; }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (_imagesService == null) _imagesService = ServiceLocator.Current.GetInstance<IImagesService>(); if (value is string) { BitmapSource imageSource = new BitmapImage(); Action sourceSetter = async () => { var bytes = await _imagesService.ImageBytesFromUrl(value as string); if(bytes != null) imageSource.SetSource(new MemoryStream(bytes)); }; sourceSetter(); return imageSource; } else return value; }
public CategoriesController(IAdminCategoriesService categories, IImagesService categoryImages) { this.categories = categories; this.images = categoryImages; }
public FileUploadController(IImagesService images, IUsersService users) { this.images = images; this.users = users; }
public async Task Initialize(IBaconProvider baconProvider) { _imagesService = baconProvider.GetService<IImagesService>(); }
public GalleryController() { this.data = new UoWData(); this.imagesService = new ImagesService(data); }
public ImagesController(IImagesService imagesService, IIssuesService issuesService) { this.imagesService = imagesService; this.issuesService = issuesService; }
public ImageController(IImagesService images, IUsersService users) :base(users) { this.images = images; }
public AccountController(IImagesService images) { this.images = images; }
public HomeController(IImagesService images, IRecipesService recipes, IArticlesService articles) { this.images = images; this.recipes = recipes; this.articles = articles; }
public CommunitiesController(ICommunitiesService communities, IImagesService images, IUsersService users) { this.communities = communities; this.images = images; this.users = users; }
public PreviewDataConverter() { var baconProvider = ServiceLocator.Current.GetInstance<IBaconProvider>(); _imagesService = baconProvider.GetService<IImagesService>(); _systemServices = baconProvider.GetService<ISystemServices>(); }
private static async Task<ViewModelBase> MakeContextedTuple(IImagesService imagesService, IOfflineService offlineService, ISettingsService settingsService, NeverEndingRedditView linksEnumerator) { ViewModelBase vm; while ((vm = await linksEnumerator.Next()) != null) { if (vm is LinkViewModel && imagesService.MightHaveImagesFromUrl(((LinkViewModel)vm).Url) && (!settingsService.OnlyFlipViewUnread || !offlineService.HasHistory(((LinkViewModel)vm).Url))) { var targetViewModel = vm as LinkViewModel; var smartOfflineService = ServiceLocator.Current.GetInstance<ISmartOfflineService>(); smartOfflineService.NavigatedToOfflineableThing(targetViewModel.LinkThing, false); Messenger.Default.Send<LoadingMessage>(new LoadingMessage { Loading = true }); await ServiceLocator.Current.GetInstance<IOfflineService>().StoreHistory(targetViewModel.Url); var imageResults = await ServiceLocator.Current.GetInstance<IImagesService>().GetImagesFromUrl(targetViewModel.LinkThing == null ? "" : targetViewModel.LinkThing.Data.Title, targetViewModel.Url); Messenger.Default.Send<LoadingMessage>(new LoadingMessage { Loading = false }); if (imageResults != null && imageResults.Count() > 0) { var imageTuple = new Tuple<string, IEnumerable<Tuple<string, string>>, string>(targetViewModel.LinkThing != null ? targetViewModel.LinkThing.Data.Title : "", imageResults, targetViewModel.LinkThing != null ? targetViewModel.LinkThing.Data.Id : ""); Messenger.Default.Send<LongNavigationMessage>(new LongNavigationMessage { Finished = true, TargetUrl = targetViewModel.Url }); return new LinkedPictureViewModel { LinkTitle = imageTuple.Item1.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace(""", "\"").Replace("'", "'").Trim(), LinkId = imageTuple.Item3, Pictures = imageTuple.Item2.Select(tpl => new LinkedPictureViewModel.LinkedPicture { Title = tpl.Item1.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace(""", "\"").Replace("'", "'").Trim(), ImageSource = tpl.Item2, Url = tpl.Item2 }) }; } } else if (vm is LinkViewModel && LinkGlyphUtility.GetLinkGlyph(vm) == LinkGlyphUtility.WebGlyph && !settingsService.OnlyFlipViewImages && settingsService.ApplyReadabliltyToLinks && (!settingsService.OnlyFlipViewUnread || !offlineService.HasHistory(((LinkViewModel)vm).Url))) { var targetViewModel = vm as LinkViewModel; var smartOfflineService = ServiceLocator.Current.GetInstance<ISmartOfflineService>(); smartOfflineService.NavigatedToOfflineableThing(targetViewModel.LinkThing, true); await ServiceLocator.Current.GetInstance<IOfflineService>().StoreHistory(targetViewModel.Url); var result = await ReadableArticleViewModel.LoadAtLeastOne(ServiceLocator.Current.GetInstance<ISimpleHttpService>(), targetViewModel.Url, targetViewModel.LinkThing.Data.Id); result.WasStreamed = true; result.ContentIsFocused = false; return result; } else if (vm is LinkViewModel && ((LinkViewModel)vm).IsSelfPost && !settingsService.OnlyFlipViewImages && (!settingsService.OnlyFlipViewUnread || !offlineService.HasHistory(((LinkViewModel)vm).Url))) { var targetViewModel = vm as LinkViewModel; var smartOfflineService = ServiceLocator.Current.GetInstance<ISmartOfflineService>(); smartOfflineService.NavigatedToOfflineableThing(targetViewModel.LinkThing, true); await ServiceLocator.Current.GetInstance<IOfflineService>().StoreHistory(targetViewModel.Url); return vm; } } return null; }
public HomeController(IImagesService imageService) { _imageService = imageService; }
public ImagesController(IImagesService images) { this.images = images; }
public PreviewDataConverter(IBaconProvider baconProvider) { _imagesService = baconProvider.GetService<IImagesService>(); _systemServices = baconProvider.GetService<ISystemServices>(); }
public ArticlesController() { this.uoWData = new UoWData(); this.ArticlesService = new ArticlesService(this.uoWData); this.imagesService = new ImagesService(this.uoWData); }
public TracksController(ITracksService tracks, IImagesService images, IProcessImageHelper processImageHelper) { this.tracks = tracks; this.processImageHelper = processImageHelper; this.images = images; }
public ImagesAdministrationController( IImagesService images) { this.images = images; }
public async Task Initialize(IBaconProvider baconProvider) { _imagesService = baconProvider.GetService<IImagesService>(); _tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication(); _tileUpdater.EnableNotificationQueue(true); }