public FeedsViewModel(ILibrary library, IFeedRepository feedRepository) { this.library = library; this.feedRepository = feedRepository; refreshTimer = new Timer(RefreshFeeds, null, (int)TimeSpan.FromMinutes(1).TotalMilliseconds, Timeout.Infinite); }
public FeedProcessor( IFeedRepository feeds, IPageRepository pages) { Feeds = feeds; Pages = pages; }
/* The repository values will be injected into the class when * the dependency injection framework calls the constructor */ public TwitterService(IFeedRepository feedRepository, IUserRepository userRepository, ITweetRepository tweetRepository) { _userRepository = userRepository; _feedRepository = feedRepository; _tweetRepository = tweetRepository; }
public HomeController(IFeedRepository repository) { if (repository == null) { throw new ArgumentNullException(); } this.repository = repository; }
public CheckFeedJobQueueProcess(IVkGroupRepository groupRepository, IFeedRepository feedRepository, IDateTimeHelper dateTimeHelper, JmxClientConfiguration jmxConfiguration, ILog log) { this.groupRepository = groupRepository; this.feedRepository = feedRepository; this.dateTimeHelper = dateTimeHelper; this.jmxConfiguration = jmxConfiguration; this.log = log; }
/* The repository values will be injected into the class when * the dependency injection framework calls the constructor */ public TwitterService(IFeedRepository feedRepository, IUserRepository userRepository, ITweetRepository tweetRepository) { _userRepository = userRepository; _feedRepository = feedRepository; _tweetRepository = tweetRepository; }
public FeedController( IConnectionManager connManager, IMatchRepository matchRepository, IFeedRepository feedRepository) : base(connManager) { _matchRepository = matchRepository; _feedRepository = feedRepository; }
/// <summary> /// Get all available feeds /// </summary> /// <returns></returns> public SubscriptionsVM GetAllFeeds() { feedRepository = new FeedRepository(new FeedContext()); SubscriptionsVM model = new SubscriptionsVM(); model.Feeds = ConvertToSubscription(); return(model); }
public FeedController(ILogger <FeedController> logger, UserManager <ApplicationUser> userManager, IFeedRepository feedRepository, IDepartmentRepository departmentRepository, IFeedResponseRepository feedResponseRepository) { _logger = logger; _userManager = userManager; _feedRepository = feedRepository; _feedResponseRepository = feedResponseRepository; _departmentRepository = departmentRepository; }
public FeedsController( IConnectionManager signalRConnectionManager, IFeedRepository feedRepository, IMatchRepository matchRepository) : base(signalRConnectionManager) { _feedRepository = feedRepository; _matchRepository = matchRepository; }
public DownloadPodcastsFromReader(string label, string baseDirPath, string dateFormat, bool deleteOlderFiles, IFeedRepository reader, int getFilesFromTheLastXDays, MainWindow window) { _label = label; _baseDirPath = baseDirPath; _dateFormat = dateFormat; _deleteOlderFiles = deleteOlderFiles; _reader = reader; _getFilesFromTheLastXDays = getFilesFromTheLastXDays; _window = window; }
public CreateProjectProcess(IGroupInfoProvider groupInfoProvider, IVkGroupRepository vkGroupRepository, IUnitOfWorkProvider unitOfWorkProvider, IDateTimeHelper dateTimeHelper, IFeedRepository feedRepository, IProjectRepository projectRepository, ILog log) { this.groupInfoProvider = groupInfoProvider; this.vkGroupRepository = vkGroupRepository; this.unitOfWorkProvider = unitOfWorkProvider; this.dateTimeHelper = dateTimeHelper; this.feedRepository = feedRepository; this.projectRepository = projectRepository; this.log = log; }
public FeedService( IFeedRepository feedRepository, IWebRepository webRepository, IHtml2TextConverter html2TextConverter ) { _feedRepository = feedRepository; _webRepository = webRepository; _html2TextConverter = html2TextConverter; _log = LogManager.GetLogger("Feeds"); }
public NotificationCalendarService( ICollectionReferenceDataService collectionReferenceDataService, IFeedRepository feedRepository, IDateTimeProvider dateTimeProvider, ILogger logger) { _collectionReferenceDataService = collectionReferenceDataService; _feedRepository = feedRepository; _dateTimeProvider = dateTimeProvider; _logger = logger; }
protected override void Dispose(bool disposing) { if (disposing) { if (this.repository != null) { this.repository.Dispose(); this.repository = null; } } base.Dispose(disposing); }
private static void WindowOnPasswordReceived(string password) { _reader = new FeedRepository(Reader.CreateReader(_email, password, "scroll") as Reader); DownloadPodcastsFromReader downloadPodcastsFromReader = new DownloadPodcastsFromReader(_listenSubscriptions, _baseDirPath, _dateFormat, _deleteOlderFiles, _reader, _getFilesFromTheLastXDays, _window); downloadPodcastsFromReader.Process(); Console.WriteLine("************* Fertig **************"); Console.ReadLine(); Thread.Sleep(5000); _window.Close(); }
public FeedService( ILogger <IFeedRepository> logger, IFeedRepository feedRepository, IApiFeedRequestModelValidator feedModelValidator, IBOLFeedMapper bolfeedMapper, IDALFeedMapper dalfeedMapper ) : base(logger, feedRepository, feedModelValidator, bolfeedMapper, dalfeedMapper) { }
public FeedService(IFeedRepository feedRepository, IUserRepository userRepository, IArticlePictureRepository articlePictureRepository, IProductPictureRepository productPictureRepository, IFarmPictureRepository farmPictureRepository, IUserPhotoRepository userPhotoRepository) { _feedRepository = feedRepository; _userRepository = userRepository; _articlePictureRepository = articlePictureRepository; _farmPictureRepository = farmPictureRepository; _productPictureRepository = productPictureRepository; _userPhotoRepository = userPhotoRepository; }
public AbstractFeedService( ILogger logger, IFeedRepository feedRepository, IApiFeedRequestModelValidator feedModelValidator, IBOLFeedMapper bolFeedMapper, IDALFeedMapper dalFeedMapper) : base() { this.feedRepository = feedRepository; this.feedModelValidator = feedModelValidator; this.bolFeedMapper = bolFeedMapper; this.dalFeedMapper = dalFeedMapper; this.logger = logger; }
public FundingClaimsFeedService( ISyndicationFeedService syndicationFeedService, ISyndicationFeedParserService <FundingClaimsFeedItem> syndicationFeedParserService, IFeedItemMappingService feedItemMappingService, IFeedRepository feedRepository, AtomFeedSettings atomFeedSettings, ILogger logger) { _syndicationFeedService = syndicationFeedService; _syndicationFeedParserService = syndicationFeedParserService; _feedItemMappingService = feedItemMappingService; _feedRepository = feedRepository; _atomFeedSettings = atomFeedSettings; _logger = logger; }
public DelfiFeedService ( ILogger <DelfiFeedService> logger, IDelfiFeedClient delfiCLient, IDelfiFeedEndpointManager endpointManager, IFeedRepository feedRepository, IFeedsUpdateTimeRepository feedsUpdateTimeRepository ) { _logger = logger; _delfiClient = delfiCLient; _endpointManager = endpointManager; _feedRepository = feedRepository; _feedsUpdateTimeRepository = feedsUpdateTimeRepository; }
public HomeController ( ILoginLogic loginLogic, IFeedRepository feedRepoistory, IProfileLogic profileLogic, IClaimsLogic claimsLogic, IUserRepository userRepository ) { _loginLogic = loginLogic; _feedRepoistory = feedRepoistory; _profileLogic = profileLogic; _claimsLogic = claimsLogic; _userRepository = userRepository; }
private static void Main(string[] args) { try { _email = ConfigurationManager.AppSettings["GoogleAccount"]; _baseDirPath = String.IsNullOrEmpty(ConfigurationManager.AppSettings["BasePath"]) ? @"c:\temp\" : ConfigurationManager.AppSettings["BasePath"]; _deleteOlderFiles = bool.Parse(String.IsNullOrEmpty(ConfigurationManager.AppSettings["DeleteOlderFiles"]) ? "false" : ConfigurationManager.AppSettings["DeleteOlderFiles"]); _listenSubscriptions = "Listen Subscriptions"; _dateFormat = "yyyyMMddTHHmmss"; _getFilesFromTheLastXDays = int.Parse(String.IsNullOrEmpty(ConfigurationManager.AppSettings["GetFilesFromTheLastXDays"]) ? "3" : ConfigurationManager.AppSettings["GetFilesFromTheLastXDays"]); _reader = null; MainWindow window = new MainWindow(); _window = window; window.PasswordReceived += WindowOnPasswordReceived; window.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public GetPodcastLinksFromFeed(IFeedRepository repository, int getFilesFromTheLastXDays) { _repository = repository; _getFilesFromTheLastXDays = getFilesFromTheLastXDays; }
public FeedService(IFeedRepository feedRepository) { FeedRepository = feedRepository; }
public SearchController(IFeedRepository repository) { _repository = repository; }
public FeedManagementController(IFeedRepository feedRepository) { this.feedRepository = feedRepository; }
public FeedService(IFeedRepository feedRepository, IBroker broker) { _feedRepository = feedRepository; _broker = broker; }
public FeedsController(IFeedRepository repository) { _repository = repository; }
public FeedsController(IFeedRepository feedRepo, IPageRepository pageRepo) { Feeds = feedRepo; Pages = pageRepo; }
public TileController(IFeedRepository repository) { _repository = repository; }
public HomeViewModel() { _feedRepository = new FeedRepository(); }
public FeedService(IUserService userService, IPublicationService publicationService, IFeedRepository feedRepository) { UserService = userService; PublicationService = publicationService; FeedRepository = feedRepository; }
public Posts(IFeedRepository feedRepository, IPostRepository postRepository, IUnitOfWork unitOfWork) { _feedRepository = feedRepository; _postRepository = postRepository; _unitOfWork = unitOfWork; }
public SourcesController(IFeedRepository repository) { _repository = repository; }
public AbstractApiFeedRequestModelValidator(IFeedRepository feedRepository) { this.feedRepository = feedRepository; }
public FeedService(IFeedGenerator feedGenerator, IPodcastRepository podcastRepository, IFeedRepository feedRepository) { _feedGenerator = feedGenerator; _podcastRepository = podcastRepository; _feedRepository = feedRepository; }
public void TestMethod1() { string email = "*****@*****.**"; string password = ""; reader = new FeedRepository(Reader.CreateReader(email, password, "scroll") as Reader); //reader = new FeedRepositoryForTests(); var frc = new FlowRuntimeConfiguration(); frc.AddStreamsFrom(@" .in, getFeeds getFeeds.out0, getLinks getFeeds.out1, join.in0 getLinks, getAddress getAddress, scatter scatter.count, gather.count scatter.stream, downloadFile downloadFile, gather.stream gather, join.in1 join, .out "); frc.AddAction<string, UrlAndFeed, int>("getFeeds", getFeeds); frc.AddFunc<int, bool>("feedCount", i => { return true; }); frc.AddFunc<UrlAndFeed, IEnumerable<PodcastLinkInformation>>("getLinks", urlAndFeed => reader.GetItemsForFeed(urlAndFeed.Url, DateTime.Now.AddDays(-1))); frc.AddFunc<IEnumerable<PodcastLinkInformation>, IEnumerable<RemoteAndLocalAddress>>("getAddress", getAddress); frc.AddFunc<RemoteAndLocalAddress, RemoteAndLocalAddress>("downloadFile", downloadFile).MakeParallel(); frc.AddOperation(new Scatter<RemoteAndLocalAddress>("scatter")); frc.AddOperation(new Gather<RemoteAndLocalAddress>("gather")); frc.AddOperation(new MySimpleJoin()); using (var fr = new FlowRuntime(frc)) { fr.Process(".in", "Listen Subscriptions"); object erg; fr.WaitForResult(message => erg = message.Data); //Thread.Sleep(60000); } }
public FeedService(IServiceProvider serviceProvider) { _feedRepo = serviceProvider.GetRequiredService <IFeedRepository>(); }
public SearchFeedItemsOperation(IRequestBuilder requestBuilder, IResponseBuilder responseBuilder, IFeedRepository feedRepository, IHalResponseBuilder halResponseBuilder) { _requestBuilder = requestBuilder; _responseBuilder = responseBuilder; _feedRepository = feedRepository; _halResponseBuilder = halResponseBuilder; }
public GetSubscriptionFeedQuerHandler(IFeedRepository repository, ICurrentPrincipal currentPrincipal) { this.repository = repository; this.currentPrincipal = currentPrincipal; }
public void Setup() { // setup data objects channelVersionRules = new List <ChannelVersionRuleResource>(); projectResource = new ProjectResource { DeploymentProcessId = TestHelpers.GetId("deploymentprocess"), Id = TestHelpers.GetId("project") }; deploymentProcessResource = new DeploymentProcessResource { ProjectId = projectResource.Id, Id = projectResource.DeploymentProcessId }; releaseTemplateResource = new ReleaseTemplateResource { DeploymentProcessId = projectResource.DeploymentProcessId, Packages = new List <ReleaseTemplatePackage>(), Id = TestHelpers.GetId("releaseTemplate") }; channelResource = new ChannelResource { IsDefault = true, Id = TestHelpers.GetId("channel"), ProjectId = projectResource.Id, Rules = channelVersionRules, Name = TestHelpers.GetId("channelname") }; feedResource = new FeedResource { Links = new LinkCollection { { "SearchTemplate", TestHelpers.GetId("searchUri") } } }; // setup mocks logger = Substitute.For <ILogger>(); versionResolver = Substitute.For <IPackageVersionResolver>(); versionRuleTester = Substitute.For <IChannelVersionRuleTester>(); deploymentProcessRepository = Substitute.For <IDeploymentProcessRepository>(); deploymentProcessRepository.Get(projectResource.DeploymentProcessId) .Returns(Task.FromResult(deploymentProcessResource)); deploymentProcessRepository .GetTemplate(Arg.Is <DeploymentProcessResource>(deploymentProcessResource), Arg.Is <ChannelResource>(channelResource)).Returns(Task.FromResult(releaseTemplateResource)); versionRuleTester .Test(Arg.Any <IOctopusAsyncRepository>(), Arg.Any <ChannelVersionRuleResource>(), Arg.Any <string>()) .Returns(Task.FromResult(channelVersionRuleTestResult)); releaseRepository = Substitute.For <IReleaseRepository>(); feedRepository = Substitute.For <IFeedRepository>(); feedRepository.Get(Arg.Any <string>()).Returns(feedResource); repository = Substitute.For <IOctopusAsyncRepository>(); repository.DeploymentProcesses.Returns(deploymentProcessRepository); repository.Releases.Returns(releaseRepository); repository.Feeds.Returns(feedRepository); repository.Client .Get <List <PackageResource> >(Arg.Any <string>(), Arg.Any <IDictionary <string, object> >()).Returns(packages); builder = new ReleasePlanBuilder(logger, versionResolver, versionRuleTester); }
public FeedService(IUnitOfWork UnitOfWork, CacheManager <Feed> FeedCacheManager, CacheManager <Source> SourceCacheManager) { feedRepository = UnitOfWork.FeedRepository; feedCacheManager = (FeedCacheManager)FeedCacheManager; sourceCacheManager = (SourceCacheManager)SourceCacheManager; }
public UnitOfWork(IFeedRepository FeedRepository, ISourceRepository SourceRepository, ICollectionRepository CollectionRepository) { feedRepository = FeedRepository; sourceRepository = SourceRepository; collectionRepository = CollectionRepository; }
public FeedPhotoController(IFeedRepository feedRepository) { this.feedRepository = feedRepository; }
public FeedContainerVM PopulateFeedContainer(FeedContainerInputModel searchModel = null) { var userId = 1; //harcoded userId for demo purposes FeedContainerVM feedContainerVM = new FeedContainerVM(); feedRepository = new FeedRepository(new FeedContext()); subscriptionRepository = new SubscriptionRepository(new FeedContext()); temporalFeedRepository = new TemporalFeedRepository(new FeedContext()); feedContainerVM.feeds = ConvertToSubscription().Where(x => x.isSubscribed == true); feedContainerVM.hasSubscriptions = hasSubscriptions(); List <FeedItemEntity> downloadFeeds = new List <FeedItemEntity>(); //TODO: Search parameter if (searchModel == null) { var syncedFeeds = temporalFeedRepository.FindBy(x => x.userId == userId).ToList(); var lastSyncedItem = syncedFeeds.FirstOrDefault(); TimeSpan elapsedTime = TimeSpan.MinValue; if (lastSyncedItem != null) { elapsedTime = DateTime.Now - lastSyncedItem.lastSynced; } //Syncronize every 8 hours if (elapsedTime.Hours >= 8 || lastSyncedItem == null) { return(SyncroniceFeeds()); } else { feedContainerVM.feedItems = syncedFeeds.Select(x => new FeedItemEntity { Id = x.Id, description = x.description != null ? x.description : "", IsActive = x.IsActive, link = x.link != null ? x.link : "", author = x.author != null ? x.author : "", imageUrl = x.imageUrl != null ? x.imageUrl : "", pubDate = x.pubDate != null ? x.pubDate : "", title = x.title != null ? x.title : "" }).ToList(); return(feedContainerVM); } } else { var syncedFeeds = temporalFeedRepository.FindBy(x => x.userId == userId).ToList(); IEnumerable <FeedItemEntity> filteredFeeds; if (searchModel.selectedFeedId > 0) { filteredFeeds = syncedFeeds.Where(x => x.feedId == searchModel.selectedFeedId && (x.title.ToLower().Contains(searchModel.searchKey != null ? searchModel.searchKey.ToLower() : string.Empty) || x.description.ToLower().Contains(searchModel.searchKey != null ? searchModel.searchKey.ToLower() : string.Empty))).Select(x => new FeedItemEntity { Id = x.Id, description = x.description != null ? x.description : "", IsActive = x.IsActive, link = x.link != null ? x.link : "", author = x.author != null ? x.author : "", imageUrl = x.imageUrl != null ? x.imageUrl : "", pubDate = x.pubDate != null ? x.pubDate : "", title = x.title != null ? x.title : "" }).ToList(); } else { filteredFeeds = syncedFeeds.Where(x => x.title.ToLower().Contains(searchModel.searchKey != null ? searchModel.searchKey.ToLower() : string.Empty) || x.description.ToLower().Contains(searchModel.searchKey != null ? searchModel.searchKey.ToLower() : string.Empty)).Select(x => new FeedItemEntity { Id = x.Id, description = x.description != null ? x.description : "", IsActive = x.IsActive, link = x.link != null ? x.link : "", author = x.author != null ? x.author : "", imageUrl = x.imageUrl != null ? x.imageUrl : "", pubDate = x.pubDate != null ? x.pubDate : "", title = x.title != null ? x.title : "" }).ToList(); } feedContainerVM.feedItems = filteredFeeds; } return(feedContainerVM); }
public CommentController(IFeedRepository repository) { _repository = repository; }