/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="next">The next request delegate in the pipeline.</param> /// <param name="domainService">Retrieves domain details.</param> /// <param name="webHelperService">Provides access to low level web components.</param> /// <param name="webService">Retrieves website information.</param> public CmsMiddleware(RequestDelegate next, IDomainService domainService, IWebHelperService webHelperService, IWebService webService) { _next = next; _domainService = domainService; _webHelperService = webHelperService; _webService = webService; }
/// <summary> /// Renders page link. /// </summary> /// <param name="htmlHelper">This is an HtmlHelper extension method.</param> /// <param name="pageLinkViewModel">Contains all of the information required to render a page link.</param> /// <returns>MvcHtmlString containing page link.</returns> public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageLinkViewModel pageLink) { // If page ID not specified, then render link to the current page (this might be the case on a special administration page, where PageId is not set) if (pageLink.Page.PageId == 0) { string pathAndQuery = string.Format("{0}{1}", htmlHelper.ViewContext.HttpContext.Request.Path, htmlHelper.ViewContext.HttpContext.Request.QueryString); string pageLinkHtml = string.Format("<a href=\"{0}\">{1}</a>", pathAndQuery, htmlHelper.Encode(pageLink.LinkText)); return(new HtmlString(pageLinkHtml)); } // Otherwise, render link to page specified if (pageLink.Page.ParentPageId == null) { return(htmlHelper.RouteLink(pageLink.LinkText, "HomePage", pageLink.RouteValues, pageLink.HtmlAttributes)); } else { IWebHelperService webHelperService = (IWebHelperService)htmlHelper.ViewContext.HttpContext.RequestServices.GetService(typeof(IWebHelperService)); RouteValueDictionary routeValueDictionary = pageLink.RouteValues == null ? new RouteValueDictionary() : new RouteValueDictionary(pageLink.RouteValues); RouteValueDictionary htmlAttributesDictionary = pageLink.HtmlAttributes == null ? new RouteValueDictionary() : new RouteValueDictionary(pageLink.HtmlAttributes); routeValueDictionary.Add("pageid", pageLink.Page.PageId); routeValueDictionary.Add("description", webHelperService.UrlFriendly(pageLink.Description)); return(htmlHelper.RouteLink(pageLink.LinkText, "ReadPage", routeValueDictionary, (IDictionary <string, object>)htmlAttributesDictionary)); } }
private const int SizeSalt = 16; // 256 bit salt public AuthenticationConfigurationService(IEmailConfigurationService emailConfigurationService, IStringService stringService, IAuthenticationUrlService authenticationUrlService, IWebHelperService webHelperService) { _authenticationUrlService = authenticationUrlService; _emailConfigurationService = emailConfigurationService; _stringService = stringService; _webHelperService = webHelperService; }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="administrationPortalService">Provides generic administration features.</param> /// <param name="gridService">Used to construct grid view models.</param> /// <param name="masterPageService">Provides access to master pages.</param> /// <param name="masterPageConverter">Converts between master page business and view models.</param> /// <param name="webHelperService">Provides access to low level web components.</param> public MasterPagePortalService(IAdministrationPortalService administrationPortalService, IGridService gridService, IMasterPageService masterPageService, IModelConverter <MasterPage, MasterPageViewModel> masterPageConverter, IWebHelperService webHelperService) { _administrationPortalService = administrationPortalService; _gridService = gridService; _masterPageService = masterPageService; _masterPageConverter = masterPageConverter; _webHelperService = webHelperService; }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="authenticationService">Provides access to authentication features.</param> /// <param name="authorizationService">Authorization service.</param> /// <param name="formHelperService">Provides assistance with forms.</param> /// <param name="testimonialRepository">Repository for administering testimonials in underlying storage.</param> /// <param name="webHelperService">Web helper service.</param> public TestimonialService(IAuthenticationService authenticationService, IAuthorizationService authorizationService, IFormHelperService formHelperService, ITestimonialRepository testimonialRepository, IWebHelperService webHelperService) { _authenticationService = authenticationService; _authorizationService = authorizationService; _formHelperService = formHelperService; _testimonialRepository = testimonialRepository; _webHelperService = webHelperService; }
public ForumConfigurationService(IEmailConfigurationService emailConfigurationService, IForumUrlService forumUrlService, IOptions <ForumOptions> options, IStringService stringService, IWebHelperService webHelperService) { _emailConfigurationService = emailConfigurationService; _forumUrlService = forumUrlService; _options = options; _stringService = stringService; _webHelperService = webHelperService; }
public FormService(IAuthenticationService authenticationService, IEmailConfigurationService emailConfigurationService, IEmailService emailService, IFormRepository formRepository, IPageService pageService, IWebHelperService webHelperService) { _authenticationService = authenticationService; _emailConfigurationService = emailConfigurationService; _emailService = emailService; _formRepository = formRepository; _pageService = pageService; _webHelperService = webHelperService; }
/// <summary> /// Renders a page URL with route values. /// </summary> /// <param name="urlHelper">This is a UrlHelper extension method.</param> /// <param name="page">The page whose link is rendered.</param> /// <param name="description">SEO text that is displayed just before query string.</param> /// <param name="routeValues">Route values that should be added to the link.</param> /// <returns>String containing page URL.</returns> public static string PageUrl(this IUrlHelper urlHelper, Page page, string description, object routeValues) { IWebHelperService webHelperService = (IWebHelperService)urlHelper.ActionContext.HttpContext.RequestServices.GetService(typeof(IWebHelperService)); RouteValueDictionary routeValueDictionary = routeValues == null ? new RouteValueDictionary() : new RouteValueDictionary(routeValues); routeValueDictionary.Add("pageid", page.PageId); routeValueDictionary.Add("description", webHelperService.UrlFriendly(description)); return(urlHelper.RouteUrl("ReadPage", routeValueDictionary)); }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="administrationPortalService">Provides generic administration features.</param> /// <param name="formHelperService">Form helper service.</param> /// <param name="gridService">Used to construct grid view models.</param> /// <param name="webConverter">Converts between web business and web view models.</param> /// <param name="webService">Provides access to websites.</param> /// <param name="webHelperService">Access to low level web components.</param> public WebPortalService(IAdministrationPortalService administrationPortalService, IFormHelperService formHelperService, IGridService gridService, IModelConverter <Web, WebViewModel> webConverter, IWebService webService, IWebHelperService webHelperService) { _administrationPortalService = administrationPortalService; _formHelperService = formHelperService; _gridService = gridService; _webConverter = webConverter; _webService = webService; _webHelperService = webHelperService; }
public ForumService(IEmailService emailService, IForumAuthorizer forumAuthorizer, IForumConfigurationService forumConfigurationService, IForumRepository forumRepository, IForumValidator forumValidator, IUserRepository userRepository, IWebHelperService webHelperService) { _emailService = emailService; _forumAuthorizer = forumAuthorizer; _forumConfigurationService = forumConfigurationService; _forumRepository = forumRepository; _forumValidator = forumValidator; _userRepository = userRepository; _webHelperService = webHelperService; }
public CarouselService(ICarouselRepository carouselRepository, ICarouselValidator carouselValidator, IImageAnalysisService imageAnalysisService, IPageService pageService, IUnitOfWorkFactory unitOfWorkFactory, IUploadService uploadService, IWebHelperService webHelperService) { _carouselRepository = carouselRepository; _carouselValidator = carouselValidator; _imageAnalysisService = imageAnalysisService; _pageService = pageService; _unitOfWorkFactory = unitOfWorkFactory; _uploadService = uploadService; _webHelperService = webHelperService; }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="assetService">Asset service.</param> /// <param name="authenticationService">Authentication service.</param> /// <param name="pagePortalService">Provides access to portal related page functionality.</param> /// <param name="pageService">Provides access to pages.</param> /// <param name="uploadService">Provides access to uploads.</param> /// <param name="webHelperService">Low level access to web components.</param> public PagesController(IAssetService assetService, IAuthenticationService authenticationService, IDomainService domainService, IPagePortalService pagePortalService, IPageService pageService, IUploadService uploadService, IWebHelperService webHelperService, IWebService webService) { _assetService = assetService; _authenticationService = authenticationService; _domainService = domainService; _pagePortalService = pagePortalService; _pageService = pageService; _uploadService = uploadService; _webHelperService = webHelperService; _webService = webService; }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="administrationService">Administration service.</param> /// <param name="administrationPortalService">Administration portal service.</param> /// <param name="assetService">Assets service.</param> /// <param name="authenticationService">Provces access to authentication functions.</param> /// <param name="elementService">Provides access to element information.</param> /// <param name="gridService">Used to construct grid view models.</param> /// <param name="masterPageService">Used for the retrieval of master pages.</param> /// <param name="pageService">Provides access to page management functionality.</param> /// <param name="webHelperService">Provides low level access to web components.</param> public PagePortalService(IAdministrationService administrationService, IAdministrationPortalService administrationPortalService, IAssetService assetService, IAuthenticationService authenticationService, IElementService elementService, IGridService gridService, IMasterPageService masterPageService, IPageService pageService, IWebHelperService webHelperService) { _administrationService = administrationService; _administrationPortalService = administrationPortalService; _assetService = assetService; _authenticationService = authenticationService; _elementService = elementService; _gridService = gridService; _masterPageService = masterPageService; _pageService = pageService; _webHelperService = webHelperService; }
public AuthenticationService(IAuthenticationConfigurationService authenticationConfigurationService, IAuthenticationProviderService authenticationProviderService, IAuthenticationValidator authenticationValidator, IEmailService emailService, IImageAnalysisService imageAnalysisService, ISecurityService securityService, IStringService stringService, IUnitOfWorkFactory unitOfWorkFactory, IUserRepository userRepository, IUploadService uploadService, IWebHelperService webHelperService) { _authenticationConfigurationService = authenticationConfigurationService; _authenticationProviderService = authenticationProviderService; _authenticationValidator = authenticationValidator; _emailService = emailService; _imageAnalysisService = imageAnalysisService; _securityService = securityService; _stringService = stringService; _unitOfWorkFactory = unitOfWorkFactory; _uploadService = uploadService; _userRepository = userRepository; _webHelperService = webHelperService; }
public YouTubeVideoService(IWebHelperService webHelperService, IConfigSettings configSettings) { _configSettings = configSettings; _webHelperService = webHelperService; }
public ErrorLoggingService(IWebHelperService webHelperService, IConfigSettings configSettings) { _configSettings = configSettings; _webHelperService = webHelperService; }
public AuthenticationUrlService(ISecurityService securityService, IWebHelperService webHelperService) { _securityService = securityService; _webHelperService = webHelperService; }
/// <summary> /// Constructor sets dependent components. /// </summary> /// <param name="controlConfigurationService">Provides configuration values for portal controls.</param> /// <param name="webHelperService">Provides access to HTTP-specific information about an individual HTTP request.</param> public BreadcrumbService(IControlConfigurationService controlConfigurationService, IWebHelperService webHelperService) { _controlConfigurationService = controlConfigurationService; _webHelperService = webHelperService; }
public AssetService(IAssetRepository assetRepository, IStorageService storageService, IWebHelperService webHelperService) { _assetRepository = assetRepository; _storageService = storageService; _webHelperService = webHelperService; }
public static string GetUrl(this IUrlHelper urlHelper, UrlParameters urlParameters, object routeValues) { IWebHelperService webHelperService = (IWebHelperService)urlHelper.ActionContext.HttpContext.RequestServices.GetService(typeof(IWebHelperService)); return(webHelperService.GetUrl(urlParameters, routeValues)); }
public static string UrlFriendly(this IUrlHelper urlHelper, string text) { IWebHelperService webHelperService = (IWebHelperService)urlHelper.ActionContext.HttpContext.RequestServices.GetService(typeof(IWebHelperService)); return(webHelperService.UrlFriendly(text)); }
public AdministrationPortalService(IWebHelperService webHelperService) { _webHelperService = webHelperService; }
public ForumUrlService(IActionContextAccessor actionContextAccessor, IUrlHelperFactory urlHelperFactory, IWebHelperService webHelperService) { _actionContextAccessor = actionContextAccessor; _urlHelperFactory = urlHelperFactory; _webHelperService = webHelperService; }
public BandsInTownArtistEventsService(IWebHelperService webHelperService, IConfigSettings configSettings) { _apiId = new Lazy <string>(() => configSettings.BandsInTownApiKey); _webHelperService = webHelperService; }
public ShareService(IShareRepository shareRepository, IWebHelperService webHelperService) { _shareRepository = shareRepository; _webHelperService = webHelperService; }
public LyricsService(IWebHelperService webHelperService, IAsyncMethodInterceptor interceptor, ILoggingService loggingService) { _interceptor = interceptor; _loggingService = loggingService; _webHelperService = webHelperService; }