コード例 #1
0
ファイル: HomeService.cs プロジェクト: ealsur/mvpstream
 public static HomeViewModel GetModel(ISearchService SearchService)
 {
     return new HomeViewModel() {
         UltimasPublicaciones = SearchService.Latest("RSS",20).Entries,
         UltimosVideos = SearchService.Latest("Video", 10).Entries
     };
 }
コード例 #2
0
 /// <summary>
 /// Public constructor
 /// </summary>
 public FilterService()
 {
     _facilityService = new FacilityService();
     _searchService = new SearchService();
     _popularCityService = new PopulairCitiesService();
     _filterBuilder = new FilterBuilder();
 }
コード例 #3
0
 public TopicsService(ITopicsDataAccess da, IMessagesDataAccess messagesDa, ISearchService searchIndex, ILoggerService loggerService)
 {
     _dataAccess = da;
     _messagesDataAccess = messagesDa;
     _searchIndex = searchIndex;
     _loggerService = loggerService;
 }
コード例 #4
0
ファイル: MorphemeController.cs プロジェクト: wesley1001/Root
        public MorphemeController(
			ISearchService searchService,
			IMaintainService maintainService)
        {
            _searchService = searchService;
            _maintainService = maintainService;
        }
コード例 #5
0
ファイル: MotionUtilTest.cs プロジェクト: bentayloruk/VsVim
 private void Create(ITextView textView)
 {
     _textView = textView;
     _textBuffer = textView.TextBuffer;
     _buffer = _textView.TextBuffer;
     _snapshot = _buffer.CurrentSnapshot;
     _buffer.Changed += delegate { _snapshot = _buffer.CurrentSnapshot; };
     _globalSettings = new Vim.GlobalSettings();
     _localSettings = new LocalSettings(_globalSettings, _textView);
     _markMap = new MarkMap(new TrackingLineColumnService());
     _vimData = new VimData();
     _search = VimUtil.CreateSearchService(_globalSettings);
     _jumpList = VimUtil.CreateJumpList();
     _statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
     _navigator = VimUtil.CreateTextStructureNavigator(_textView.TextBuffer);
     _motionUtil = new MotionUtil(
         _textView,
         _markMap,
         _localSettings,
         _search,
         _navigator,
         _jumpList,
         _statusUtil.Object,
         _vimData);
 }
コード例 #6
0
        public SearchController(IResourceService resourceService, IUserService userService, IProfileService profileService, ISearchService searchService, IStateService stateService, IConversationService conversationService)
            : base(resourceService, userService, profileService, stateService, conversationService)
        {
            _searchService = searchService;
            ResourceService = resourceService;

        }
コード例 #7
0
 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatusService statusService,
     IAppConfiguration config)
 {
     EntitiesContext = entitiesContext;
     PackageService = packageService;
     PackageFileService = packageFileService;
     UserService = userService;
     NugetExeDownloaderService = nugetExeDownloaderService;
     ContentService = contentService;
     StatisticsService = null;
     IndexingService = indexingService;
     SearchService = searchService;
     AutoCuratePackage = autoCuratePackage;
     StatusService = statusService;
     _config = config;
 }
コード例 #8
0
ファイル: ListController.cs プロジェクト: navy235/WebSite
 public ListController(
     IMemberService _memberService
     , IAreaAttService _areaAttService
     , IAreaService _areaService
     , IOutDoorMediaCateService _outDoorMediaCateService
     , IOutDoorService _outDoorService
     , IFormatCateService _formatCateService
     , ICompanyBussinessService _companyBussinessService
     , ICompanyFundService _companyFundService
     , ICompanyScaleService _companyScaleService
     , IPeriodCateService _periodCateService
     , IOwnerCateService _ownerCateService
     , IAuctionCalendarService _auctionCalendarService
     , ISourceService _sourceService
     , ISearchService _searchService
     )
 {
     areaAttService = _areaAttService;
     areaService = _areaService;
     memberService = _memberService;
     outDoorMediaCateService = _outDoorMediaCateService;
     outDoorService = _outDoorService;
     formatCateService = _formatCateService;
     companyBussinessService = _companyBussinessService;
     companyFundService = _companyFundService;
     companyScaleService = _companyScaleService;
     periodCateService = _periodCateService;
     ownerCateService = _ownerCateService;
     auctionCalendarService = _auctionCalendarService;
     sourceService = _sourceService;
     searchService = _searchService;
 }
コード例 #9
0
        public SearchHighlightService(ISearchService searchService)
        {
            Argument.IsNotNull(() => searchService);

            _searchService = searchService;
            _searchService.Searched += OnSearched;
        }
コード例 #10
0
 public TestableV1Feed(
     IEntityRepository<Package> repo,
     IGalleryConfigurationService configuration,
     ISearchService searchService)
     : base(repo, configuration, searchService)
 {
 }
コード例 #11
0
 public BusinessService(IRepository respository)
 {
     this.respository = respository;
     this.searchBusinessService = new SearchService(this.respository);
     this.accessHistoryService = new AccessHistoryService(this.respository);
     this.dashboardService = new DashboardService(this.respository);
 }
コード例 #12
0
 public PackagesController(
     IPackageService packageService,
     IUploadFileService uploadFileService,
     IMessageService messageService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IAppConfiguration config,
     IIndexingService indexingService,
     ICacheService cacheService,
     EditPackageService editPackageService,
     IPackageDeleteService packageDeleteService,
     ISupportRequestService supportRequestService,
     AuditingService auditingService)
 {
     _packageService = packageService;
     _uploadFileService = uploadFileService;
     _messageService = messageService;
     _searchService = searchService;
     _autoCuratedPackageCmd = autoCuratedPackageCmd;
     _packageFileService = packageFileService;
     _entitiesContext = entitiesContext;
     _config = config;
     _indexingService = indexingService;
     _cacheService = cacheService;
     _editPackageService = editPackageService;
     _packageDeleteService = packageDeleteService;
     _supportRequestService = supportRequestService;
     _auditingService = auditingService;
 }
コード例 #13
0
ファイル: WordController.cs プロジェクト: wesley1001/Root
        public WordController(
			ISearchService searchService,
			IMaintainService maintainService)
        {
            _searchService = searchService;
            _maintainService = maintainService;
        }
コード例 #14
0
ファイル: WikiPageController.cs プロジェクト: kevinthant/wiki
 public WikiPageController(IOrchardServices orchardServices, 
     IRepository<WikiPageAttachmentRecord> repoWikiAttachment,
     ITagService tagService,
     IAuthorizationService authorizationService,
     INotifier notifier,
     ISiteService siteService,
     ISearchService searchService,
     IShapeFactory shapeFactory,
     IWikiPageService wikiPageService,
     IMediaService mediaService
    ){
     _orchardServices = orchardServices;
     _repoWikiAttachment = repoWikiAttachment;
     _tagService = tagService;
     _authorizationService = authorizationService;
     _notifier = notifier;
     _searchService = searchService;
     _siteService = siteService;
     _wikiPageService = wikiPageService;
     _mediaService = mediaService;
     Logger = NullLogger.Instance;
     Shape = shapeFactory;
    
     
 }
コード例 #15
0
        public static async Task<IQueryable<Package>> SearchCore(
            ISearchService searchService,
            HttpRequestBase request,
            IQueryable<Package> packages, 
            string searchTerm, 
            string targetFramework, 
            bool includePrerelease,
            CuratedFeed curatedFeed)
        {
            SearchFilter searchFilter;
            // We can only use Lucene if:
            //  a) We are looking for the latest version of a package OR the Index contains all versions of each package
            //  b) The sort order is something Lucene can handle
            if (TryReadSearchFilter(searchService.ContainsAllVersions, request.RawUrl, out searchFilter))
            {
                searchFilter.SearchTerm = searchTerm;
                searchFilter.IncludePrerelease = includePrerelease;
                searchFilter.CuratedFeed = curatedFeed;
                searchFilter.SupportedFramework = targetFramework;

                var results = await GetResultsFromSearchService(searchService, searchFilter);

                return results;
            }

            if (!includePrerelease)
            {
                packages = packages.Where(p => !p.IsPrerelease);
            }

            return packages.Search(searchTerm);
        }
コード例 #16
0
 public SearchViewModel(ISearchService searchService)
 {
     this.searchService = searchService;
     Search = new RelayCommand(SearchExecuted);
     ShowDetails = new RelayCommand<SearchResult>(ShowDetailsExecuted);
     Results = new List<SearchResult>();
 }
コード例 #17
0
        public SearchController(ISearchService searchService)
        {
            if (searchService == null)
                throw new ArgumentNullException("searchService");

            this._searchService = searchService;
        }
コード例 #18
0
        public static async Task<IQueryable<Package>> SearchCore(
            ISearchService searchService,
            HttpRequestBase request,
            IQueryable<Package> packages, 
            string searchTerm, 
            string targetFramework, 
            bool includePrerelease,
            CuratedFeed curatedFeed)
        {
            SearchFilter searchFilter;
            // We can only use Lucene if the client queries for the latest versions (IsLatest \ IsLatestStable) versions of a package
            // and specific sort orders that we have in the index.
            if (TryReadSearchFilter(request.RawUrl, out searchFilter))
            {
                searchFilter.SearchTerm = searchTerm;
                searchFilter.IncludePrerelease = includePrerelease;
                searchFilter.CuratedFeed = curatedFeed;

                Trace.WriteLine("TODO: use target framework parameter - see #856" + targetFramework);

                var results = await GetResultsFromSearchService(searchService, searchFilter);

                return results;
            }

            if (!includePrerelease)
            {
                packages = packages.Where(p => !p.IsPrerelease);
            }

            return packages.Search(searchTerm);
        }
コード例 #19
0
 public void Setup()
 {
     _mockRepository = new Mock<ISearchRepository>();
     _mockStatusGeneratorFactory = new Mock<IStatusGeneratorFactory>();
     _mockPipelinePositionGenerator = new Mock<IPipelinePositionGenerator>();
     _searchService = new SearchService(_mockRepository.Object, _mockStatusGeneratorFactory.Object, _mockPipelinePositionGenerator.Object);
 }
コード例 #20
0
ファイル: ListViewModel.cs プロジェクト: dolittle/Toodeloo
        public ListViewModel(
            IToDoService toDoService, 
            IMessenger messenger, 
            IDispatcher dispatcher,
            ISearchService searchService,
            ISharingService sharingService
            )
        {
            _toDoService = toDoService;
            _searchService = searchService;
            _dispatcher = dispatcher;
            _messenger = messenger;
            _sharingService = sharingService;

            Items = new ObservableCollection<ToDoItem>();
            SearchResult = new ObservableCollection<ToDoItem>();

            RegisterSubscriptions();
            SetupCommands();
            
            Items.CollectionChanged += (s, c) =>
            {
                var count = Items.Count;
                Count = count;
                messenger.Send(new ItemCountChanged { Count = count });
            };
            PopulateItems();
        }
コード例 #21
0
ファイル: MotionUtilTest.cs プロジェクト: franch/VsVim
 private void Create(ITextView textView, IEditorOptions editorOptions = null)
 {
     _textView = textView;
     _textBuffer = textView.TextBuffer;
     _snapshot = _textBuffer.CurrentSnapshot;
     _textBuffer.Changed += delegate { _snapshot = _textBuffer.CurrentSnapshot; };
     _globalSettings = new Vim.GlobalSettings();
     _localSettings = new LocalSettings(_globalSettings, FSharpOption.CreateForReference(editorOptions), FSharpOption.CreateForReference(textView));
     _markMap = new MarkMap(new TrackingLineColumnService());
     _vimData = new VimData();
     _search = VimUtil.CreateSearchService(_globalSettings);
     _jumpList = VimUtil.CreateJumpList();
     _statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
     _navigator = VimUtil.CreateTextStructureNavigator(_textView, WordKind.NormalWord);
     _motionUtil = new MotionUtil(
         _textView,
         _markMap,
         _localSettings,
         _search,
         _navigator,
         _jumpList,
         _statusUtil.Object,
         VimUtil.GetWordUtil(textView),
         _vimData);
 }
コード例 #22
0
 public SearchController(ISearchService searchService, IQueryRepositoryFactory queryRepositoryFactory, IUserIdentity userIdentity, IAccessQueryService accessQueryService)
 {
     _searchService = searchService;
     _queryRepositoryFactory = queryRepositoryFactory;
     _userIdentity = userIdentity;
     _accessQueryService = accessQueryService;
 }
コード例 #23
0
 public SearchServiceDemo(String defaultRepository, String secondaryRepository, String userName, String password)
     : base(defaultRepository, secondaryRepository, userName, password)
 {
     ServiceFactory serviceFactory = ServiceFactory.Instance;
     searchService =
         serviceFactory.GetRemoteService<ISearchService>(DemoServiceContext, "search");
 }
コード例 #24
0
 public PackagesController(
     IPackageService packageService,
     IUploadFileService uploadFileService,
     IUserService userService,
     IMessageService messageService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IAppConfiguration config,
     IIndexingService indexingService,
     ICacheService cacheService)
 {
     _packageService = packageService;
     _uploadFileService = uploadFileService;
     _userService = userService;
     _messageService = messageService;
     _searchService = searchService;
     _autoCuratedPackageCmd = autoCuratedPackageCmd;
     _nugetExeDownloaderService = nugetExeDownloaderService;
     _packageFileService = packageFileService;
     _entitiesContext = entitiesContext;
     _config = config;
     _indexingService = indexingService;
     _cacheService = cacheService;
 }
コード例 #25
0
 public LocalisationController(ILogger logger,
     ISearchService searchService,
     IGeocodeService geocodeService)
 {
     _Logger = logger;
     _SearchService = searchService;
     _GeocodeService = geocodeService;
 }
コード例 #26
0
        internal FileSystemTextManipulator(IFileSystem fileSystem)
        {
            _fileSystem = fileSystem;

            _searchService = new SearchService(this, _fileSystem.GetReadWriteLock());
            // Leads to very slow startup... -> hope that it should be better now
            _searchService.StartIndexing();
        }
コード例 #27
0
        public SearchController(ISearchService propertySearchService, ILandlordSearchService landlordSearchService)
        {
            Check.If(propertySearchService).IsNotNull();
            Check.If(landlordSearchService).IsNotNull();

            _propertySearchService = propertySearchService;
            _landlordSearchService = landlordSearchService;
        }
コード例 #28
0
ファイル: SearchController.cs プロジェクト: jk915/set-locale
 public SearchController(
     ISearchService searchService,
     IUserService userService, 
     IFormsAuthenticationService formsAuthenticationService) 
     : base(userService, formsAuthenticationService)
 {
     _searchService = searchService;
 }
コード例 #29
0
 public NotificationBatchService(IOrchardServices orchardServices, IContentManager contentManager, 
     ISearchService searchService, ISiteService siteService)
 {
     _contentManager = contentManager;
     _searchService = searchService;
     _orchardServices = orchardServices;
     _siteService = siteService;
 }
コード例 #30
0
        public ArtistPanoramaViewModelFactory(ISearchService searchService, IEventAggregator eventAggregator, IPageSwitchingService pageSwitchingService, INotificationService notificationService)
        {
            _searchService = searchService;
            this._notificationService = notificationService;
            _pageSwitchingService = pageSwitchingService;

            _eventAggregator = eventAggregator;
        }
コード例 #31
0
 public SearchController(ISearchService searchSvc) =>
コード例 #32
0
 public SearchController(ISearchService serv)
 {
     _searchService = serv;
 }
コード例 #33
0
 public MusicController(ILogger <MusicController> logger, ISearchService searchService)
 {
     _logger        = logger;
     _searchService = searchService;
 }
コード例 #34
0
ファイル: App.xaml.cs プロジェクト: patgarner/mobile
        public App(AppOptions appOptions)
        {
            _appOptions                = appOptions ?? new AppOptions();
            _userService               = ServiceContainer.Resolve <IUserService>("userService");
            _broadcasterService        = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _messagingService          = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _stateService              = ServiceContainer.Resolve <IStateService>("stateService");
            _lockService               = ServiceContainer.Resolve <ILockService>("lockService");
            _syncService               = ServiceContainer.Resolve <ISyncService>("syncService");
            _tokenService              = ServiceContainer.Resolve <ITokenService>("tokenService");
            _cryptoService             = ServiceContainer.Resolve <ICryptoService>("cryptoService");
            _cipherService             = ServiceContainer.Resolve <ICipherService>("cipherService");
            _folderService             = ServiceContainer.Resolve <IFolderService>("folderService");
            _settingsService           = ServiceContainer.Resolve <ISettingsService>("settingsService");
            _collectionService         = ServiceContainer.Resolve <ICollectionService>("collectionService");
            _searchService             = ServiceContainer.Resolve <ISearchService>("searchService");
            _authService               = ServiceContainer.Resolve <IAuthService>("authService");
            _platformUtilsService      = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _storageService            = ServiceContainer.Resolve <IStorageService>("storageService");
            _secureStorageService      = ServiceContainer.Resolve <IStorageService>("secureStorageService");
            _passwordGenerationService = ServiceContainer.Resolve <IPasswordGenerationService>(
                "passwordGenerationService");
            _i18nService         = ServiceContainer.Resolve <II18nService>("i18nService") as MobileI18nService;
            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");

            Bootstrap();
            _broadcasterService.Subscribe(nameof(App), async(message) =>
            {
                if (message.Command == "showDialog")
                {
                    var details     = message.Data as DialogDetails;
                    var confirmed   = true;
                    var confirmText = string.IsNullOrWhiteSpace(details.ConfirmText) ?
                                      AppResources.Ok : details.ConfirmText;
                    Device.BeginInvokeOnMainThread(async() =>
                    {
                        if (!string.IsNullOrWhiteSpace(details.CancelText))
                        {
                            confirmed = await Current.MainPage.DisplayAlert(details.Title, details.Text, confirmText,
                                                                            details.CancelText);
                        }
                        else
                        {
                            await Current.MainPage.DisplayAlert(details.Title, details.Text, confirmText);
                        }
                        _messagingService.Send("showDialogResolve", new Tuple <int, bool>(details.DialogId, confirmed));
                    });
                }
                else if (message.Command == "locked")
                {
                    await _stateService.PurgeAsync();
                    var lockPage = new LockPage(_appOptions, !(message.Data as bool?).GetValueOrDefault());
                    Device.BeginInvokeOnMainThread(() => Current.MainPage = new NavigationPage(lockPage));
                }
                else if (message.Command == "lockVault")
                {
                    await _lockService.LockAsync(true);
                }
                else if (message.Command == "logout")
                {
                    if (Migration.MigrationHelpers.Migrating)
                    {
                        return;
                    }
                    await LogOutAsync(false);
                }
                else if (message.Command == "loggedOut")
                {
                    // Clean up old migrated key if they ever log out.
                    await _secureStorageService.RemoveAsync("oldKey");
                }
                else if (message.Command == "resumed")
                {
                    if (Device.RuntimePlatform == Device.iOS)
                    {
                        SyncIfNeeded();
                    }
                }
                else if (message.Command == "migrated")
                {
                    await Task.Delay(1000);
                    await SetMainPageAsync();
                }
                else if (message.Command == "popAllAndGoToTabGenerator" ||
                         message.Command == "popAllAndGoToTabMyVault")
                {
                    Device.BeginInvokeOnMainThread(async() =>
                    {
                        if (Current.MainPage is TabsPage tabsPage)
                        {
                            while (tabsPage.Navigation.ModalStack.Count > 0)
                            {
                                await tabsPage.Navigation.PopModalAsync(false);
                            }
                            if (message.Command == "popAllAndGoToTabMyVault")
                            {
                                _appOptions.MyVaultTile = false;
                                tabsPage.ResetToVaultPage();
                            }
                            else
                            {
                                _appOptions.GeneratorTile = false;
                                tabsPage.ResetToGeneratorPage();
                            }
                        }
                    });
                }
            });
        }
コード例 #35
0
 public V2Feed(IEntitiesContext entities, IEntityRepository <Package> repo, IConfiguration configuration, ISearchService searchSvc)
     : base(entities, repo, configuration, searchSvc)
 {
 }
コード例 #36
0
 public SearchViewModel(
     ISearchService searchService)
 {
     _searchService = searchService;
 }
コード例 #37
0
 public SearchSessionController(
     ISearchService searchService)
 {
     _searchService = searchService;
 }
コード例 #38
0
ファイル: SearchController.cs プロジェクト: krum142/Yeetegy
 public SearchController(ISearchService searchService, IPostsService postsService)
 {
     this.searchService = searchService;
     this.postsService  = postsService;
 }
コード例 #39
0
 public RestaurantController(ISearchService searchService)
 {
     _searchService = searchService;
 }
コード例 #40
0
 public UsersModel(SocialMediaDbContext db, ISearchService search)
 {
     _db     = db;
     _search = search;
 }
コード例 #41
0
 public SearchController(ISearchService service, IMapper mapper)
 {
     this.service = service;
     this.mapper  = mapper;
 }
コード例 #42
0
 override protected void OnDestroy()
 {
     base.OnDestroy();
     SearchService = null;
 }
コード例 #43
0
        public CollectionGenresViewModel(IContainerProvider container) : base(container)
        {
            // Dependency injection
            this.collectionService = container.Resolve <ICollectionService>();
            this.dialogService     = container.Resolve <IDialogService>();
            this.indexingService   = container.Resolve <IIndexingService>();
            this.playbackService   = container.Resolve <IPlaybackService>();
            this.playlistService   = container.Resolve <IPlaylistService>();
            this.searchService     = container.Resolve <ISearchService>();
            this.eventAggregator   = container.Resolve <IEventAggregator>();

            // Commands
            this.ToggleTrackOrderCommand      = new DelegateCommand(async() => await this.ToggleTrackOrderAsync());
            this.ToggleAlbumOrderCommand      = new DelegateCommand(async() => await this.ToggleAlbumOrderAsync());
            this.RemoveSelectedTracksCommand  = new DelegateCommand(async() => await this.RemoveTracksFromCollectionAsync(this.SelectedTracks), () => !this.IsIndexing);
            this.AddGenresToPlaylistCommand   = new DelegateCommand <string>(async(playlistName) => await this.AddGenresToPlaylistAsync(this.SelectedGenres, playlistName));
            this.SelectedGenresCommand        = new DelegateCommand <object>(async(parameter) => await this.SelectedGenresHandlerAsync(parameter));
            this.ShowGenresZoomCommand        = new DelegateCommand(async() => await this.ShowSemanticZoomAsync());
            this.AddGenresToNowPlayingCommand = new DelegateCommand(async() => await this.AddGenresToNowPlayingAsync(this.SelectedGenres));
            this.ShuffleSelectedGenresCommand = new DelegateCommand(async() => await this.playbackService.EnqueueGenresAsync(this.SelectedGenres, true, false));

            this.SemanticJumpCommand = new DelegateCommand <string>((header) =>
            {
                this.HideSemanticZoom();
                this.eventAggregator.GetEvent <PerformSemanticJump>().Publish(new Tuple <string, string>("Genres", header));
            });

            // Settings
            SettingsClient.SettingChanged += async(_, e) =>
            {
                if (SettingsClient.IsSettingChanged(e, "Behaviour", "EnableRating"))
                {
                    this.EnableRating = (bool)e.SettingValue;
                    this.SetTrackOrder("GenresTrackOrder");
                    await this.GetTracksAsync(null, this.SelectedGenres, this.SelectedAlbums, this.TrackOrder);
                }

                if (SettingsClient.IsSettingChanged(e, "Behaviour", "EnableLove"))
                {
                    this.EnableLove = (bool)e.SettingValue;
                    this.SetTrackOrder("GenresTrackOrder");
                    await this.GetTracksAsync(null, this.SelectedGenres, this.SelectedAlbums, this.TrackOrder);
                }
            };

            // PubSub Events
            this.eventAggregator.GetEvent <ShellMouseUp>().Subscribe((_) => this.IsGenresZoomVisible = false);

            // Set the initial AlbumOrder
            this.AlbumOrder = (AlbumOrder)SettingsClient.Get <int>("Ordering", "GenresAlbumOrder");

            // Set the initial TrackOrder
            this.SetTrackOrder("GenresTrackOrder");

            // Set width of the panels
            this.LeftPaneWidthPercent  = SettingsClient.Get <int>("ColumnWidths", "GenresLeftPaneWidthPercent");
            this.RightPaneWidthPercent = SettingsClient.Get <int>("ColumnWidths", "GenresRightPaneWidthPercent");

            // Cover size
            this.SetCoversizeAsync((CoverSizeType)SettingsClient.Get <int>("CoverSizes", "GenresCoverSize"));
        }
コード例 #44
0
        public App(AppOptions appOptions)
        {
            _appOptions                = appOptions ?? new AppOptions();
            _userService               = ServiceContainer.Resolve <IUserService>("userService");
            _broadcasterService        = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _messagingService          = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _stateService              = ServiceContainer.Resolve <IStateService>("stateService");
            _lockService               = ServiceContainer.Resolve <ILockService>("lockService");
            _syncService               = ServiceContainer.Resolve <ISyncService>("syncService");
            _tokenService              = ServiceContainer.Resolve <ITokenService>("tokenService");
            _cryptoService             = ServiceContainer.Resolve <ICryptoService>("cryptoService");
            _cipherService             = ServiceContainer.Resolve <ICipherService>("cipherService");
            _folderService             = ServiceContainer.Resolve <IFolderService>("folderService");
            _settingsService           = ServiceContainer.Resolve <ISettingsService>("settingsService");
            _collectionService         = ServiceContainer.Resolve <ICollectionService>("collectionService");
            _searchService             = ServiceContainer.Resolve <ISearchService>("searchService");
            _authService               = ServiceContainer.Resolve <IAuthService>("authService");
            _platformUtilsService      = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _storageService            = ServiceContainer.Resolve <IStorageService>("storageService");
            _passwordGenerationService = ServiceContainer.Resolve <IPasswordGenerationService>(
                "passwordGenerationService");
            _i18nService         = ServiceContainer.Resolve <II18nService>("i18nService") as MobileI18nService;
            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");

            InitializeComponent();
            SetCulture();
            ThemeManager.SetThemeStyle("light");
            MainPage = new HomePage();
            var mainPageTask = SetMainPageAsync();

            ServiceContainer.Resolve <MobilePlatformUtilsService>("platformUtilsService").Init();
            _broadcasterService.Subscribe(nameof(App), async(message) =>
            {
                if (message.Command == "showDialog")
                {
                    var details     = message.Data as DialogDetails;
                    var confirmed   = true;
                    var confirmText = string.IsNullOrWhiteSpace(details.ConfirmText) ?
                                      AppResources.Ok : details.ConfirmText;
                    if (!string.IsNullOrWhiteSpace(details.CancelText))
                    {
                        confirmed = await MainPage.DisplayAlert(details.Title, details.Text, confirmText,
                                                                details.CancelText);
                    }
                    else
                    {
                        await MainPage.DisplayAlert(details.Title, details.Text, confirmText);
                    }
                    _messagingService.Send("showDialogResolve", new Tuple <int, bool>(details.DialogId, confirmed));
                }
                else if (message.Command == "locked")
                {
                    await _stateService.PurgeAsync();
                    MainPage = new NavigationPage(new LockPage());
                }
                else if (message.Command == "lockVault")
                {
                    await _lockService.LockAsync(true);
                }
                else if (message.Command == "logout")
                {
                    await LogOutAsync(false);
                }
                else if (message.Command == "loggedOut")
                {
                    // TODO
                }
                else if (message.Command == "unlocked" || message.Command == "loggedIn")
                {
                    // TODO
                }
            });
        }
コード例 #45
0
ファイル: SearchDecorator.cs プロジェクト: xiaopohou/cuyahoga
 public SearchDecorator(IContentItemService <T> contentItemService, ISearchService searchService)
     : base(contentItemService)
 {
     this._searchService = searchService;
 }
コード例 #46
0
 public SearchController(ISearchService searchService)
 {
     _searchService = searchService ?? throw new ArgumentNullException(nameof(searchService));
 }
コード例 #47
0
 public CurrentPlaylistService([NotNull] ISearchService searchService,
                               [NotNull] ICurrentPlaylistRepository currentPlaylistRepository)
 {
     _searchService             = searchService;
     _currentPlaylistRepository = currentPlaylistRepository;
 }
コード例 #48
0
 protected override ODataV1FeedController CreateController(IEntityRepository <Package> packagesRepository,
                                                           IGalleryConfigurationService configurationService, ISearchService searchService)
 {
     return(new ODataV1FeedController(packagesRepository, configurationService, searchService));
 }
コード例 #49
0
 public SearchController(ISearchService <Book> searchService)
 {
     _searchService = searchService;
 }
コード例 #50
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompartmentResourceHandler"/> class.
        /// </summary>
        /// <param name="searchService">The search service to execute the search operation.</param>
        public CompartmentResourceHandler(ISearchService searchService)
        {
            EnsureArg.IsNotNull(searchService, nameof(searchService));

            _searchService = searchService;
        }
コード例 #51
0
 public SearchesController(ISearchService searchService, ILogger <SearchesController> logger)
 {
     this.searchService = searchService;
     this.logger        = logger;
 }
コード例 #52
0
 public SearchController(ISearchService searchService, ILogger <SearchController> logger)
 {
     _searchService = searchService;
     _logger        = logger;
 }
コード例 #53
0
ファイル: DocumentController.cs プロジェクト: aurlaw/VueCore
 public DocumentController(ILogger <DocumentController> logger, IMediator mediatr, IDocumentService docService, ISearchService searchService)
 {
     _logger        = logger;
     _mediatr       = mediatr;
     _docService    = docService;
     _searchService = searchService;
 }
コード例 #54
0
 public TriathletesController(IRaceService raceService, ISearchService search, ICacheService cache) : base(raceService, cache)
 {
     _SearchService = search;
 }
コード例 #55
0
ファイル: SearchesController.cs プロジェクト: slskd/slskd
 /// <summary>
 ///     Initializes a new instance of the <see cref="SearchesController"/> class.
 /// </summary>
 /// <param name="searchService"></param>
 public SearchesController(ISearchService searchService)
 {
     Searches = searchService;
 }
コード例 #56
0
 public SearchController(ISearchService searchService)
 {
     this.searchService = searchService;
 }
コード例 #57
0
 public FacebookLeadAdapterProvider(int accountId, int leadAdapterAndAccountMapID, ILeadAdaptersRepository leadAdaptersRepository, IServiceProviderRepository serviceProviderRepository,
                                    IImportDataRepository importDataRepository, ISearchService <Contact> searchService, IUnitOfWork unitOfWork,
                                    ICustomFieldService customFieldService, ICachingService cacheService, ICommunicationService communicationService, IMailGunService mailGunService, IContactService contactService, IAccountRepository accRepository)
     : base(accountId, leadAdapterAndAccountMapID, LeadAdapterTypes.BDX, leadAdaptersRepository, importDataRepository, searchService, unitOfWork,
            customFieldService, cacheService, serviceProviderRepository, mailGunService, contactService)
 {
     Logger.Current.Verbose("Enter into Facebook LeadAdapterProvider");
     this.mailGunService            = mailGunService;
     this.searchService             = searchService;
     this.contactService            = contactService;
     this.leadAdaptersRepository    = leadAdaptersRepository;
     this.importDataRepository      = importDataRepository;
     this.accountRepository         = accRepository;
     this.cacheService              = cacheService;
     this.customFieldService        = customFieldService;
     this.serviceProviderRepository = serviceProviderRepository;
 }
コード例 #58
0
ファイル: HomeController.cs プロジェクト: synweb/rocms
 public HomeController(ISearchService searchService)
 {
     _searchService = searchService;
 }
コード例 #59
0
 public SearchController(IGHLocationRepository lr, ISearchService ss)
 {
     _lr = lr;
     _ss = ss;
 }
コード例 #60
0
 public CuratedFeedsController(ICuratedFeedService curatedFeedService,
                               ISearchService searchService)
 {
     CuratedFeedService = curatedFeedService;
     SearchService      = searchService;
 }