public ArticlePrologueShareViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext)
        {
            TextTranslator = textTranslator;

            _article = new Lazy <IArticle>(articleRenderingContext.Get <IArticle>);
        }
 public EmailArticlePopOutViewModel(
     ITextTranslator textTranslator,
     IRenderingItemContext articleRenderingContext,
     IAuthenticatedUserContext userContext)
 {
     TextTranslator          = textTranslator;
     ArticleRenderingContext = articleRenderingContext;
     UserContext             = userContext;
     Article = ArticleRenderingContext.Get <IArticle>();
 }
 public UserPageEntitlementViewModel(
     IRenderingItemContext renderingItemContext,
     IEntitledProductContext entitledProductContext,
     IEntitlementProductFactory entitledProductFactory,
     IEntitlementAccessContext entitlementAccessContext)
 {
     RenderingItemContext     = renderingItemContext;
     EntitledProductContext   = entitledProductContext;
     EntitledProductFactory   = entitledProductFactory;
     EntitlementAccessContext = entitlementAccessContext;
 }
        public ArticleTagsViewModel(
            IRenderingItemContext articleRenderingContext)
        {
            ArticleRenderingContext = articleRenderingContext;

            Tags = ArticleRenderingContext.Get <I___BaseTaxonomy>().Taxonomies.Take(3).Select(x => new LinkableModel
            {
                LinkableText = x.Item_Name,
                LinkableUrl  = SearchTaxonomyUtil.GetSearchUrl(x)
            });
        }
示例#5
0
 public AsktheAnalystPopOutViewModel(
     ISiteRootContext siteRootContext,
     ITextTranslator textTranslator,
     IRenderingItemContext articleRenderingContext,
     IAuthenticatedUserContext userContext)
 {
     SiteRootContext         = siteRootContext;
     TextTranslator          = textTranslator;
     ArticleRenderingContext = articleRenderingContext;
     UserContext             = userContext;
     Article = ArticleRenderingContext.Get <IArticle>();
 }
示例#6
0
        public EmailAuthorPopOutViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext,
            IAuthenticatedUserContext userContext,
            IAuthorIndexClient authorIndexClient,
            IHttpContextProvider httpContext)
        {
            TextTranslator          = textTranslator;
            ArticleRenderingContext = articleRenderingContext;
            UserContext             = userContext;
            AuthorIndexClient       = authorIndexClient;
            HttpContext             = httpContext;

            Author = AuthorIndexClient.GetAuthorByUrlName(HttpContext.Current.Request.Url.Segments.Last());
        }
示例#7
0
        public ArticlePrologueBookmarkViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext,
            IAuthenticatedUserContext authenticatedUserContext,
            IIsSavedDocumentContext isSavedDocuementContext,
            ISiteRootContext siteRootContext,
            IArticleService articleService)
        {
            TextTranslator  = textTranslator;
            SiteRootContext = siteRootContext;
            ArticleService  = articleService;

            Article             = articleRenderingContext.Get <IArticle>();
            IsUserAuthenticated = authenticatedUserContext.IsAuthenticated;
            IsArticleBookmarked = IsUserAuthenticated && isSavedDocuementContext.IsSaved(Article._Id);
            BookmarkPublication = ArticleService.GetArticlePublicationName(Article);
            BookmarkTitle       = Article?.Title;
        }
示例#8
0
 public GlassRenderingItemContext(
     IRenderingItemContext renderingItemContext)
 {
     RenderingItemContext = renderingItemContext;
 }