Ejemplo n.º 1
0
 public HomeController(IFeedService feedService, IFolderService folderService, IItemService itemService, FeedsDbEntities context)
 {
     _feedService = feedService;
     _folderService = folderService;
     _itemService = itemService;
     _context = context;
 }
Ejemplo n.º 2
0
 public BlogController(IFeedService ss, SignInManager <AppUser> sm, IDataService ds, IFeedService fs)
 {
     _ss = ss;
     _sm = sm;
     _fs = fs;
     _ds = ds;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="userRepository">an instance of the user repository</param>
 /// <param name="feedService">an instance of the Social Feed Service</param>
 /// <param name="contentRepository">an instance of the Episerver's content repository</param>
 /// <param name="adapter">an instance of the CommunityActivityAdapter</param>
 public CommunityFeedRepository(IUserRepository userRepository, IFeedService feedService, IContentRepository contentRepository, ICommunityActivityAdapter adapter)
 {
     this.userRepository    = userRepository;
     this.feedService       = feedService;
     this.contentRepository = contentRepository;
     this.activityAdapter   = adapter;
 }
 public MainViewModel(IFeedService feedService)
 {
     foreach (FeedCategory category in EnumExtensions.GetValues<FeedCategory>())
     {
         this._categories[category] = new FeedCollection(feedService, category);
     }
 }
Ejemplo n.º 5
0
        protected override void OnSetUpMocks()
        {
            base.OnSetUpMocks();

            _feedServiceMock             = MockRepository.StrictMock <IFeedService>();
            _syndicationFeedFormaterMock = MockRepository.StrictMock <SyndicationFeedFormatter>();
        }
Ejemplo n.º 6
0
        public BlogViewModel(string title, Uri feedAddress, IFeedService feedService = null, IBlobCache cache = null)
        {
            Title = title;
            FeedAddress = feedAddress;
            FeedService = feedService ?? Locator.Current.GetService<IFeedService>();
            Cache = cache ?? Locator.Current.GetService<IBlobCache>();

            Articles = new ReactiveList<ArticleViewModel>();

            Refresh = ReactiveCommand.CreateAsyncObservable(x => GetAndFetchLatestArticles());
            Refresh.Subscribe(articles =>
            {
                // this could be done cleaner, send a PR.
                // Refresh.ToPropertyEx(this, x => x.Articles);

                Articles.Clear();
                Articles.AddRange(articles);
            });

            
            Refresh.ThrownExceptions.Subscribe(thrownException => { this.Log().Error(thrownException); });
            _isLoading = Refresh.IsExecuting.ToProperty(this, x => x.IsLoading);

            // post-condition checks
            Condition.Ensures(FeedAddress).IsNotNull();
            Condition.Ensures(FeedService).IsNotNull();
            Condition.Ensures(Cache).IsNotNull();
        }
Ejemplo n.º 7
0
        public HomeController(
            IBrowserConfigService browserConfigService,
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            IFeedService feedService,
#endif
            IManifestService manifestService,
            IOpenSearchService openSearchService,
            IRobotsService robotsService,
            ISitemapService sitemapService,
            IOptions<AppSettings> appSettings)
        {
            this.appSettings = appSettings;
            this.browserConfigService = browserConfigService;
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            this.feedService = feedService;
#endif
            this.manifestService = manifestService;
            this.openSearchService = openSearchService;
            this.robotsService = robotsService;
            this.sitemapService = sitemapService;
        }
Ejemplo n.º 8
0
 public BlogController(IDataService data, IStorageService storage, SignInManager <AppUser> signInMgr, IFeedService feedService)
 {
     DataService    = data;
     StorageService = storage;
     SignInManager  = signInMgr;
     FeedService    = feedService;
 }
Ejemplo n.º 9
0
 // The required services are injected. Registration is in Program.cs
 public Run(ILogger <Run> logger, IFeedService feed, IAppConfiguration configuration, IConsole console)
 {
     this.log     = logger;
     this.cfg     = configuration;
     this.console = console;
     this.feed    = feed;
 }
Ejemplo n.º 10
0
        public RssFeedController(IFeedService feedService, IConfiguration config)
        {
            _feedService = feedService;
            var configuration = config;

            _url = configuration["RssFeed:Url"];
        }
Ejemplo n.º 11
0
 public HomeController(IRobotsService robotsService,
                       IManifestService manifestService,
                       IContactUsService contactUsService,
                       IUserSettingsService userSettingsService,
                       IUserProfileService userProfileService,
                       ILogService logService, IMapper mapper,
                       IVideoAttributesService videoAttributesService,
                       IBannerDetailsService bannerDetailsService,
                       ISitemapService sitemapService,
                       IOpenSearchService openSearchService,
                       IBrowserConfigService browserConfigService,
                       IFeedService feedService)
     : base(logService, mapper)
 {
     _videoAttributesService = videoAttributesService;
     _mapper = mapper;
     _userSettingsService  = userSettingsService;
     _userProfileService   = userProfileService;
     _bannerDetailsService = bannerDetailsService;
     _contactUsService     = contactUsService;
     _manifestService      = manifestService;
     _robotsService        = robotsService;
     _sitemapService       = sitemapService;
     _openSearchService    = openSearchService;
     _browserConfigService = browserConfigService;
     _feedService          = feedService;
 }
 public AtomFeedGenerator(IFeedDataClient feedDataClient,
                          IFeedService feedService,
                          IPublishService publishService,
                          IFeedSettings feedSettings)
     : base(feedDataClient, feedService, publishService, feedSettings)
 {
 }
Ejemplo n.º 13
0
        public HomeController(
            IBrowserConfigService browserConfigService,
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            IFeedService feedService,
#endif
            IManifestService manifestService,
            IOpenSearchService openSearchService,
            IRobotsService robotsService,
            ISitemapService sitemapService,
            IOptions <AppSettings> appSettings)
        {
            this.appSettings          = appSettings;
            this.browserConfigService = browserConfigService;
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            this.feedService = feedService;
#endif
            this.manifestService   = manifestService;
            this.openSearchService = openSearchService;
            this.robotsService     = robotsService;
            this.sitemapService    = sitemapService;
        }
Ejemplo n.º 14
0
 public BlogController(IDataService db, IFeedService ss, SignInManager <AppUser> sm, ICompositeViewEngine viewEngine)
 {
     _db         = db;
     _ss         = ss;
     _sm         = sm;
     _viewEngine = viewEngine;
 }
Ejemplo n.º 15
0
 public HomeController(IFeedService service)
 {
     this.feedService = service;
      IEnumerable<FeedDto> feedDtos = feedService.GetFeeds();
     var mapper = new MapperConfiguration(cfg => cfg.CreateMap<FeedDto, FeedViewModel>()).CreateMapper();
     feeds = mapper.Map<IEnumerable<FeedDto>, IEnumerable<FeedViewModel>>(feedDtos);
 }
Ejemplo n.º 16
0
 public ListPageModel(IFeedService feedService)
 {
     _feedService   = feedService;
     Feeds          = new ObservableCollection <Feed>();
     RefreshCommand = new Command(async() => { await LoadFeedsAsync(); });
     NewCommand     = new Command(GoToDetailsPage);
 }
Ejemplo n.º 17
0
        public BlogViewModel(string title, Uri feedAddress, IFeedService feedService = null, IBlobCache cache = null)
        {
            Title       = title;
            FeedAddress = feedAddress;
            FeedService = feedService ?? Locator.Current.GetService <IFeedService>();
            Cache       = cache ?? Locator.Current.GetService <IBlobCache>();

            Articles = new ReactiveList <ArticleViewModel>();

            Refresh = ReactiveCommand.CreateAsyncObservable(x => GetAndFetchLatestArticles());
            Refresh.Subscribe(articles =>
            {
                // this could be done cleaner, send a PR.
                // Refresh.ToPropertyEx(this, x => x.Articles);

                Articles.Clear();
                Articles.AddRange(articles);
            });


            Refresh.ThrownExceptions.Subscribe(thrownException => { this.Log().Error(thrownException); });
            _isLoading = Refresh.IsExecuting.ToProperty(this, x => x.IsLoading);

            // post-condition checks
            Condition.Ensures(FeedAddress).IsNotNull();
            Condition.Ensures(FeedService).IsNotNull();
            Condition.Ensures(Cache).IsNotNull();
        }
 public RssFeedGenerator(IFeedDataClient feedDataClient,
     IFeedService feedService,
     IPublishService publishService,
     IFeedSettings feedSettings)
     : base(feedDataClient, feedService, publishService, feedSettings)
 {
 }
Ejemplo n.º 19
0
 public FeedController(IChangelogData changelogData,
                       IMapper mapper,
                       IFeedService feedService)
 {
     _feedService   = feedService;
     _mapper        = mapper;
     _changelogData = changelogData;
 }
Ejemplo n.º 20
0
		public EventPublisher(IEventDefinitionService eventDefinitionService, IPointLedgerRepository pointLedgerRepository, IFeedService feedService, IAwardCalculator awardCalculator, IProfileService profileService)
		{
			_eventDefinitionService = eventDefinitionService;
			_pointLedgerRepository = pointLedgerRepository;
			_feedService = feedService;
			_awardCalculator = awardCalculator;
			_profileService = profileService;
		}
Ejemplo n.º 21
0
 public Builder(IFeedService feedService, IFeedRunService feedRunService, IRunner runner, IFileContentProcessor fileProcessor, ILogger logger)
 {
     FeedRunService = feedRunService;
     FeedService    = feedService;
     Runner         = runner;
     _fileProcessor = fileProcessor;
     Log            = logger;
 }
Ejemplo n.º 22
0
 public FeedController(IFeedService feedService,
                       ICommentService commentService,
                       IReviewService reviewService)
 {
     _feedService    = feedService;
     _commentService = commentService;
     _reviewService  = reviewService;
 }
Ejemplo n.º 23
0
 public FeedController(IStorageService storageServicet, IUserService userService,
                       IFeedService feedService, TelemetryClient telemetryClient)
 {
     _storageService  = storageServicet;
     _userService     = userService;
     _feedService     = feedService;
     _telemetryClient = telemetryClient;
 }
Ejemplo n.º 24
0
 public FeedController(UserManager <User> userManager,
                       IUrlBuilder urlBuilder,
                       IFeedService feedService)
 {
     _userManager = userManager;
     _urlBuilder  = urlBuilder;
     _feedService = feedService;
 }
Ejemplo n.º 25
0
 public EventPublisher(IEventDefinitionService eventDefinitionService, IPointLedgerRepository pointLedgerRepository, IFeedService feedService, IAwardCalculator awardCalculator, IProfileService profileService)
 {
     _eventDefinitionService = eventDefinitionService;
     _pointLedgerRepository  = pointLedgerRepository;
     _feedService            = feedService;
     _awardCalculator        = awardCalculator;
     _profileService         = profileService;
 }
Ejemplo n.º 26
0
 public StoriesService(IAmazonS3Repository amazonS3Repository, IMapper mapper, IStoriesRepository storiesRepository, IFeedService feedService, IOptions <S3Settings> s3Settings)
 {
     _amazonS3Repository = amazonS3Repository;
     _mapper             = mapper;
     _storiesRepository  = storiesRepository;
     _feedService        = feedService;
     _s3Settings         = s3Settings.Value;
 }
Ejemplo n.º 27
0
 protected FeedControllerBase(
     IFeedService feedService,
     IFeedFilterStateService <FeedFiltersState> feedFilterStateService,
     IContextTypeProvider contextTypeProvider) : base(contextTypeProvider)
 {
     _feedService            = feedService;
     _feedFilterStateService = feedFilterStateService;
 }
Ejemplo n.º 28
0
 public FeedController(IFeedService feedService,
                       IMapper mapper, ILogger <FeedController> logger, ICurrentUserService currentUserService)
 {
     _feedService        = feedService;
     _mapper             = mapper;
     _logger             = logger;
     _currentUserService = currentUserService;
 }
Ejemplo n.º 29
0
        public DetailsViewModel(IPlatformService platformService, IFeedService feedService, IUserService userService) : base(platformService, userService)
        {
            _feedService = feedService;

            IsLoading       = false;
            _commentCommand = new MvxCommand(async() => await Comment(), CanComment);

            MentionsProperty = () => CommentInput;
        }
 public SearchArticlesInFeedQueryHandler(
     IFeedService feedService,
     IArticleQueryRepository articleQueryRepository,
     ILogger <SearchArticlesInFeedQueryHandler> logger)
 {
     _feedService            = feedService;
     _articleQueryRepository = articleQueryRepository;
     _logger = logger;
 }
Ejemplo n.º 31
0
 public FeedResolver(IFeedService feedService, IUserManager <ApplicationUser> userManager,
                     IFeedModelService feedModelService, IOptions <PagerOptions> pagerOptions)
     : base()
 {
     _feedService      = feedService;
     _userManager      = userManager;
     _feedModelService = feedModelService;
     _pagerOptions     = pagerOptions.Value;
 }
 /// <summary>
 /// Feed Controller constructor
 /// </summary>
 /// <param name="serviceProvider"></param>
 public FeedController(IServiceProvider serviceProvider)
 {
     _feedServices       = serviceProvider.GetRequiredService <IFeedService>();
     _complaintsServices = serviceProvider.GetRequiredService <IComplaintService>();
     _repliesServices    = serviceProvider.GetRequiredService <IReplyService>();
     _ratingsServices    = serviceProvider.GetRequiredService <IRatingService>();
     _commentsService    = serviceProvider.GetRequiredService <ICommentService>();
     _userManager        = serviceProvider.GetRequiredService <UserManager <User> >();
 }
        public DetailViewModel(IFeedService service)
        {
            if (service == null)
            {
                throw new ArgumentNullException(nameof(service));
            }

            this._service = service;
        }
Ejemplo n.º 34
0
        // $End-Sitemap$

        #endregion

        #region Constructors

        public HomeController(
            // $Start-Windows81IE11EdgeFavicon$
            IBrowserConfigService browserConfigService,
            // $End-Windows81IE11EdgeFavicon$
            // $Start-Feed$
            // $Start-TargetFramework-NetFramework$
#if NET461
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            // $End-TargetFramework-NetFramework$
            IFeedService feedService,
            // $Start-TargetFramework-NetFramework$
#endif
            // $End-TargetFramework-NetFramework$
            // $End-Feed$
            // $Start-AndroidChromeM39Favicons$
            IManifestService manifestService,
            // $End-AndroidChromeM39Favicons$
            // $Start-Search$
            IOpenSearchService openSearchService,
            // $End-Search$
            // $Start-RobotsText$
            IRobotsService robotsService,
            // $End-RobotsText$
            // $Start-Sitemap$
            ISitemapService sitemapService,
            // $End-Sitemap$
            IOptions <AppSettings> appSettings)
        {
            this.appSettings = appSettings;
            // $Start-Windows81IE11EdgeFavicon$
            this.browserConfigService = browserConfigService;
            // $End-Windows81IE11EdgeFavicon$
            // $Start-Feed$
            // $Start-TargetFramework-NetFramework$
#if NET461
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            // $End-TargetFramework-NetFramework$
            this.feedService = feedService;
            // $Start-TargetFramework-NetFramework$
#endif
            // $End-TargetFramework-NetFramework$
            // $End-Feed$
            // $Start-AndroidChromeM39Favicons$
            this.manifestService = manifestService;
            // $End-AndroidChromeM39Favicons$
            // $Start-Search$
            this.openSearchService = openSearchService;
            // $End-Search$
            // $Start-RobotsText$
            this.robotsService = robotsService;
            // $End-RobotsText$
            // $Start-Sitemap$
            this.sitemapService = sitemapService;
            // $End-Sitemap$
        }
Ejemplo n.º 35
0
 public PhotosService(IPhotosRepository photosRepository, IAmazonS3Repository amazonS3Repository, IHashtagsService hashtagsService, IMapper mapper, IFeedService feedService, IOptions <S3Settings> s3Settings)
 {
     _photosRepository   = photosRepository;
     _amazonS3Repository = amazonS3Repository;
     _hashtagsService    = hashtagsService;
     _mapper             = mapper;
     _feedService        = feedService;
     _s3Settings         = s3Settings.Value;
 }
Ejemplo n.º 36
0
        public FeedServiceTest()
        {
            _webDownloaderMock = new Mock <IHttpDownload>();
            var fakeXml = new FakeXml();

            _url = "http://good.uri";
            _webDownloaderMock.Setup(x => x.DownloadPage(It.IsAny <string>())).Returns(Task.FromResult(fakeXml.ReadFakeXml()));
            _sut = new FeedService(_webDownloaderMock.Object, new DateParser());
        }
Ejemplo n.º 37
0
 public UsersService(IUsersRepository usersRepository, ICryptographyService cryptographyService, IMapper mapper, IAmazonS3Repository amazonS3Repository, IFeedService feedService, IOptions <S3Settings> s3Settings)
 {
     _usersRepository     = usersRepository;
     _cryptographyService = cryptographyService;
     _mapper             = mapper;
     _amazonS3Repository = amazonS3Repository;
     _feedService        = feedService;
     _s3Settings         = s3Settings.Value;
 }
 public ArticleFeedGenerator(IFeedDataClient feedDataClient, 
     IFeedService feedService, 
     IPublishService publishService,
     IFeedSettings feedSettings)
 {
     _feedDataClient = feedDataClient;
     _feedService = feedService;
     _publishService = publishService;
     _feedSettings = feedSettings;
 }
 public HomeController(
     IFeedService feedService,
     IOpenSearchService openSearchService,
     IRobotsService robotsService,
     ISitemapService sitemapService)
 {
     this.feedService = feedService;
     this.openSearchService = openSearchService;
     this.robotsService = robotsService;
     this.sitemapService = sitemapService;
 }
Ejemplo n.º 40
0
		public PostService(IPostRepository postRepository, IProfileRepository profileRepository, ISettingsManager settingsManager, ITopicService topicService, ITextParsingService textParsingService, IModerationLogService moderationLogService, IForumService forumService, IEventPublisher eventPublisher, IUserService userService, IFeedService feedService)
		{
			_postRepository = postRepository;
			_profileRepository = profileRepository;
			_settingsManager = settingsManager;
			_topicService = topicService;
			_textParsingService = textParsingService;
			_moderationLogService = moderationLogService;
			_forumService = forumService;
			_eventPublisher = eventPublisher;
			_userService = userService;
			_feedService = feedService;
		}
 private static ArticleFeedGenerator CreateFeedGenerator(
     IFeedDataClient feedDataClient,
     IFeedService feedService,
     IPublishService publishService,
     IFeedSettings feedSettings)
 {
     string feedFormat = feedSettings.FeedFormat;
     switch (feedFormat.ToLower())
     {
         case "atom": return new AtomFeedGenerator(feedDataClient, feedService, publishService, feedSettings);
         case "rss": return new RssFeedGenerator(feedDataClient, feedService, publishService, feedSettings);
         default: throw new ArgumentException("Unknown feed format");
     }
 }
        // $End-Sitemap$

        #endregion

        #region Constructors

        public HomeController(
            // $Start-Windows81IE11EdgeFavicon$
            IBrowserConfigService browserConfigService,
            // $End-Windows81IE11EdgeFavicon$
            // $Start-Feed$
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            IFeedService feedService,
#endif
            // $End-Feed$
            // $Start-AndroidChromeM39Favicons$
            IManifestService manifestService,
            // $End-AndroidChromeM39Favicons$
            // $Start-Search$
            IOpenSearchService openSearchService,
            // $End-Search$
            // $Start-RobotsText$
            IRobotsService robotsService,
            // $End-RobotsText$
            // $Start-Sitemap$
            ISitemapService sitemapService,
            // $End-Sitemap$
            IOptions<AppSettings> appSettings)
        {
            this.appSettings = appSettings;
            // $Start-Windows81IE11EdgeFavicon$
            this.browserConfigService = browserConfigService;
            // $End-Windows81IE11EdgeFavicon$
            // $Start-Feed$
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            this.feedService = feedService;
#endif
            // $End-Feed$
            // $Start-AndroidChromeM39Favicons$
            this.manifestService = manifestService;
            // $End-AndroidChromeM39Favicons$
            // $Start-Search$
            this.openSearchService = openSearchService;
            // $End-Search$
            // $Start-RobotsText$
            this.robotsService = robotsService;
            // $End-RobotsText$
            // $Start-Sitemap$
            this.sitemapService = sitemapService;
            // $End-Sitemap$
        }
        public HomeController(
#if DNX451
            IFeedService feedService,
#endif
            IOpenSearchService openSearchService,
            IRobotsService robotsService,
            ISitemapService sitemapService)
        {
#if DNX451
            this.feedService = feedService;
#endif
            this.openSearchService = openSearchService;
            this.robotsService = robotsService;
            this.sitemapService = sitemapService;
        }
 public HomeController(
     IBrowserConfigService browserConfigService,
     IFeedService feedService,
     IManifestService manifestService,
     IOpenSearchService openSearchService,
     IRobotsService robotsService,
     ISitemapService sitemapService)
 {
     this.browserConfigService = browserConfigService;
     this.feedService = feedService;
     this.manifestService = manifestService;
     this.openSearchService = openSearchService;
     this.robotsService = robotsService;
     this.sitemapService = sitemapService;
 }
Ejemplo n.º 45
0
        public HomeModule(IPostService postService, IFeedService feedService, IConfigSettings configSettings)
        {
            Get["/"] = _ =>
            {
                int currentPage;
                int pageSize;

                if (!int.TryParse(Request.Query.currentpage.ToString(), out currentPage))
                {
                    currentPage = 1;
                }

                if (!int.TryParse(Request.Query.pagesize.ToString(), out pageSize))
                {
                    pageSize = 10;
                }

                var viewmodel = postService.GetViewModel(pageSize, currentPage);

                return View["index", viewmodel];
            };

            Get["/{title}"] = parameters =>
            {
                var post = feedService.GetItem(parameters.title);
                if (post == null)
                {
                    return View["404"];
                }

                return View["post", post];
            };

            Get["/about"] = _ =>
            {
                var model = configSettings.GetAppSetting("nancycategories")
                    .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                ViewBag.NancyCategories = string.Join(" or ", model);

                return View["about"];
            };

            Get["/rss"] = x => Response.AsRSS(feedService.GetItems(), "Nancy Blog", "http://blog.nancyfx.org/", "feed.xml");
        }
Ejemplo n.º 46
0
 public FeedService(Source src, string user)
 {
     user = user.ToLower();
     try
     {
         switch (src)
         {
             case Source._163:
                 service = new B163Service(user);
                 break;
             case Source._51cto:
                 service = new B51CtoService(user);
                 break;
             case Source.chinaunix:
                 service = new ChinaUnixService(user);
                 break;
             case Source.cnblogs:
                 service = new CnBlogsService(user);
                 break;
             case Source.csdn:
                 service = new CsdnService(user);
                 break;
             case Source.hexun:
                 service = new HexunService(user);
                 break;
             case Source.iteye:
                 service = new ItEyeService(user);
                 break;
             case Source.oschina:
                 service = new OschinaService(user);
                 break;
             case Source.sina:
                 service = new SinaService(user);
                 break;
             case Source.sohu:
                 service = new SohuService(user);
                 break;
         }
     }
     catch (Exception ex)
     {
         excep = ex;
     }
 }
        public HomeController(
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            IFeedService feedService,
#endif
            IOpenSearchService openSearchService,
            IRobotsService robotsService,
            ISitemapService sitemapService)
        {
#if DNX451
            // The FeedService is not available for .NET Core because the System.ServiceModel.Syndication.SyndicationFeed 
            // type does not yet exist. See https://github.com/dotnet/wcf/issues/76.
            this.feedService = feedService;
#endif
            this.openSearchService = openSearchService;
            this.robotsService = robotsService;
            this.sitemapService = sitemapService;
        }
Ejemplo n.º 48
0
		protected internal AccountController(IUserService userService, IProfileService profileService, INewAccountMailer newAccountMailer, ISettingsManager settingsManager, IPostService postService, ITopicService topicService, IForumService forumService, ILastReadService lastReadService, IClientSettingsMapper clientSettingsMapper, IUserEmailer userEmailer, IImageService imageService, IFeedService feedService, IUserAwardService userAwardService, IOwinContext owinContext, IExternalAuthentication externalAuthentication, IUserAssociationManager userAssociationManager)
		{
			_userService = userService;
			_settingsManager = settingsManager;
			_profileService = profileService;
			_newAccountMailer = newAccountMailer;
			_postService = postService;
			_topicService = topicService;
			_forumService = forumService;
			_lastReadService = lastReadService;
			_clientSettingsMapper = clientSettingsMapper;
			_userEmailer = userEmailer;
			_imageService = imageService;
			_feedService = feedService;
			_userAwardService = userAwardService;
			_owinContext = owinContext;
			_externalAuthentication = externalAuthentication;
			_userAssociationManager = userAssociationManager;
		}
Ejemplo n.º 49
0
        public HomeModule(IFeedService feedService)
        {
            Get["/"] = _ =>
            {
                int currentPage;
                int pageSize;

                if (!int.TryParse(Request.Query.currentpage.ToString(), out currentPage))
                {
                    currentPage = 0;
                }

                if (!int.TryParse(Request.Query.pagesize.ToString(), out pageSize))
                {
                    pageSize = 20;
                }
                var viewmodel = new IndexViewModel();
                var posts = feedService.GetItems(pageSize, currentPage);
                foreach (var blogPost in posts)
                {
                    blogPost.Content = null; //Prevent serialization issues
                }
                viewmodel.Posts = posts;

                return View["index", viewmodel];
            };

            Get["/{title}"] = parameters =>
            {
                var post = feedService.GetItem(parameters.title);
                if (post == null)
                {
                    return View["404"];
                }

                return View["post", post];
            };
        }
Ejemplo n.º 50
0
 public HomeModule(IFeedService feedService)
 {
     Get["/"] = _  => Response.AsJson(feedService.GetItems());
 }
Ejemplo n.º 51
0
        public FolderService(FeedsDbEntities context, IFeedService feedService)
        {
            _context = context;

            _feedService = feedService;
        }
Ejemplo n.º 52
0
 public CachedFeedService(IFeedService feedService, IConfigSettings configManager)
 {
     this.feedService = feedService;
     cacheMinutes = configManager.GetAppSetting<int>("cacheminutes");
 }
Ejemplo n.º 53
0
 public FeedController(IFeedImportingService service, IFeedService feedService)
 {
     _service = service;
     _feedService = feedService;
 }
Ejemplo n.º 54
0
 public FeedController(IFeedService feedService, FeedsDbEntities context)
     : base(context)
 {
     _feedService = feedService;
 }
Ejemplo n.º 55
0
 /// <summary>
 /// For unittest perpose
 /// </summary>
 /// <param name="feedService">Feed</param>        
 internal DemoController(IFeedService feedService)
 {
     FeedService = feedService;
 }
Ejemplo n.º 56
0
 public RssController()
 {
    _feedService = new FeedService(new UrlHelper(System.Web.HttpContext.Current.Request.RequestContext), new ContextoBaseDatos());
 }
Ejemplo n.º 57
0
 public void UseFeedService(IFeedService service)
 {
     FeedService = service;
 }
Ejemplo n.º 58
0
 protected override void Initialize(System.Web.Routing.RequestContext requestContext)
 {
     base.Initialize(requestContext);
     FeedService = new FakeFeedService();
 }
Ejemplo n.º 59
0
 public TechPageViewModel(INavigationService navigationService, IFeedService feedService) : base("ms-appx:///Assets/Data/Tech.json") {
     this.feedService = feedService;
     this.navigationService = navigationService;
     IsBusy = false;
     BusyText = "Getting Tech Feeds. Please wait...";
 }
Ejemplo n.º 60
0
 public RssController(IFeedService feedService)
 {
     _feedService = feedService;
 }