public ComponentTagHelper(IHttpContextAccessor contextAccessor, IBricsContextAccessor bricsContext)
 {
     _contextAccessor = contextAccessor;
     _bricsContext = bricsContext;
     _urlHelper = contextAccessor.HttpContext.RequestServices.GetService<IUrlHelper>();
     _htmlHelper = contextAccessor.HttpContext.RequestServices.GetService<IHtmlHelper>();
 }
Esempio n. 2
0
 public DefaultUrlManager(IOptions<SmidgeOptions> options, ISmidgeConfig config, IHasher hasher, IUrlHelper urlHelper)
 {
     _hasher = hasher;
     _urlHelper = urlHelper;
     _options = options.Value.UrlOptions;
     _config = config;
 }
        public NavigationViewModel(
            string startingNodeKey,
            string navigationFilterName,
            HttpContext context,
            IUrlHelper urlHelper,
            TreeNode<NavigationNode> rootNode,
            IEnumerable<INavigationNodePermissionResolver> permissionResolvers,
            IEnumerable<IFindCurrentNode> nodeFinders,
            string nodeSearchUrlPrefix,
            ILogger logger)
        {
            this.navigationFilterName = navigationFilterName;
            this.nodeSearchUrlPrefix = nodeSearchUrlPrefix;
            this.context = context;
            this.RootNode = rootNode;
            this.permissionResolvers = permissionResolvers;
            this.nodeFinders = nodeFinders;
            this.urlHelper = urlHelper;
            this.startingNodeKey = startingNodeKey;
            log = logger;

            removalFilters.Add(FilterIsAllowed);
            foreach(var permissionResolver in permissionResolvers)
            {
                removalFilters.Add(permissionResolver.ShouldAllowView);
            }
            
            removalFilters.Add(IsAllowedByAdjuster);



        }
 public OrganizationApiController(IBus bus, IDocumentSession session, IMapper mapper, IUrlHelper urlHelper)
 {
     _bus = bus;
     _session = session;
     _mapper = mapper;
     _urlHelper = urlHelper;
 }
Esempio n. 5
0
 public FileSystemHelper(IApplicationEnvironment appEnv, IHostingEnvironment hostingEnv, ISmidgeConfig config, IUrlHelper urlHelper)
 {
     _appEnv = appEnv;
     _config = config;
     _urlHelper = urlHelper;
     _hostingEnv = hostingEnv;
 }
        /// <summary>
        /// Returns a serializable array for the given series.
        /// </summary>
        public object GetDataSeriesArray(IUrlHelper urlHelper, bool passed)
        {
            var dayBoundaries = GetDayBoundaries();
            var lastBuild = AllBuildTestCounts.Last();
            var totalTests = lastBuild.PassedCount + lastBuild.FailedCount;

            return AllBuildTestCounts.Select
            (
                (value, index) => new
                {
                    Index = index,
                    TestCount = passed
                        ? value.PassedCount
                        : totalTests - value.PassedCount,
                    ShortCommitDate = dayBoundaries[index]
                        ? value.PushDate.ToLocalTime().ToString("MM/dd")
                        : "--",
                    LongCommitDate = value.PushDate.ToLocalTime().ToString("MM/dd/yyyy h:mm tt"),
                    BuildUrl = urlHelper.Action
                    (
                        "BuildResult",
                        "Build",
                        new { buildId = value.BuildId }
                    )
                }
            );
        }
        public AlphaPagerTagHelper(
            IUrlHelper urlHelper,
            IHtmlGenerator generator)
        {
            Generator = generator;

        }
 public OpenSearchService(
     IOptions<AppSettings> appSettings,
     IUrlHelper urlHelper)
 {
     this.appSettings = appSettings;
     this.urlHelper = urlHelper;
 }
        public NavigationViewModel(
            string startingNodeKey,
            string navigationFilterName,
            HttpContext context,
            IUrlHelper urlHelper,
            TreeNode<NavigationNode> rootNode,
            INavigationNodePermissionResolver permissionResolver,
            string nodeSearchUrlPrefix,
            ILogger logger)
        {
            this.navigationFilterName = navigationFilterName;
            this.nodeSearchUrlPrefix = nodeSearchUrlPrefix;
            this.context = context;
            this.RootNode = rootNode;
            this.permissionResolver = permissionResolver;
            this.urlHelper = urlHelper;
            this.startingNodeKey = startingNodeKey;
            log = logger;

            removalFilters.Add(FilterIsAllowed);
            removalFilters.Add(permissionResolver.ShouldAllowView);
            removalFilters.Add(IsAllowedByAdjuster);



        }
Esempio n. 10
0
 public UsersController(IUserServices userServices,
                        IAccountServices accountServices,
                        ICategoryServices categoryServices,
                        ITransactionServices transactionServices,
                        IBudgetServices budgetServices,
                        IHttpContextProvider context,
                        ISiteConfiguration config,
                        ICryptoProvider crypto,
                        IUrlHelper urlHelper,
                        IModelCache cache,
                        ICachingHelpers cachingHelpers,
                        ISessionServices sessionServices)
     : base(userServices,
                                                                 accountServices,
                                                                 categoryServices,
                                                                 transactionServices, 
                                                                 budgetServices,
                                                                 context,
                                                                 config,
                                                                 urlHelper,
                                                                 cache,
                                                                 cachingHelpers)
 {
     _crypto = crypto;
     _sessionServices = sessionServices;
 }
Esempio n. 11
0
 public ManifestService(
     IOptions<AppSettings> appSettings,
     IUrlHelper urlHelper)
 {
     this.appSettings = appSettings;
     this.urlHelper = urlHelper;
 }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedService"/> class.
 /// </summary>
 /// <param name="appSettings">The application settings.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public FeedService(
     IOptions<AppSettings> appSettings,
     IUrlHelper urlHelper)
 {
     this.appSettings = appSettings;
     this.urlHelper = urlHelper;
     this.httpClient = new HttpClient();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapPingerService"/> class.
 /// </summary>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapPingerService(
     ILoggerFactory loggerFactory,
     IUrlHelper urlHelper)
 {
     this.logger = loggerFactory.CreateLogger<SitemapPingerService>();
     this.urlHelper = urlHelper;
     this.httpClient = new HttpClient();
 }
Esempio n. 14
0
        public void AddBackofficeBottom(string urlstring, IUrlHelper url, IHtmlHelper html)
        {
            const string prefix = @"~/Areas/Backoffice/Scripts/framework/";
            urlstring = urlstring.TrimStart('/');

            var path = string.Format("{0}{1}", url.Content(prefix), (urlstring.EndsWith(".js") ? urlstring : urlstring + ".js"));
            html.Statics().FooterScripts.Add(path);
        }
 public ErrorController(IUrlHelper urlHelper)
 {
     if (urlHelper == null)
     {
         throw new ArgumentNullException("manager");
     }
     this.urlHelper = urlHelper;
 }
 public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper)
     : this(
           metadataProvider,
           GetOptions(),
           urlHelper,
           validationAttributes: new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapPingerService"/> class.
 /// </summary>
 /// <param name="loggingService">The logging service.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapPingerService(
     ILoggingService loggingService,
     IUrlHelper urlHelper)
 {
     this.loggingService = loggingService;
     this.urlHelper = urlHelper;
     this.httpClient = new HttpClient();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapPingerService"/> class.
 /// </summary>
 /// <param name="logger">The <see cref="SitemapPingerService"/> logger.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapPingerService(
     ILogger<SitemapPingerService> logger,
     IUrlHelper urlHelper)
 {
     this.logger = logger;
     this.urlHelper = urlHelper;
     this.httpClient = new HttpClient();
 }
 public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper)
     : this(
           metadataProvider,
           Mock.Of<IScopedInstance<ActionBindingContext>>(),
           urlHelper,
           validationAttributes: new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase))
 {
 }
Esempio n. 20
0
 private Menu FinishMenu(MenuDefinition menuDefinition, IUrlHelper urlHelper)
 {
     var menu = new Menu(menuDefinition.Id)
     {
         Items = MapItems(menuDefinition.Items, urlHelper)
     };
     return menu;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapService" /> class.
 /// </summary>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="memoryCache">The memory cache for the application.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapService(
     ILoggerFactory loggerFactory,
     IMemoryCache memoryCache,
     IUrlHelper urlHelper)
 {
     this.logger = loggerFactory.CreateLogger<SitemapService>();
     this.memoryCache = memoryCache;
     this.urlHelper = urlHelper;
 }
Esempio n. 22
0
 public void Setup()
 {
     _operatorRepository = MockRepository.GenerateStub<IOperatorRepository>();
     _operatorService = new OperatorService(_operatorRepository);
     _urlHelper = MockRepository.GenerateStub<IUrlHelper>();
     _objectUnderTest = new OperatorsController(_operatorService,_urlHelper);
     _objectUnderTest.Request = new HttpRequestMessage();
     _objectUnderTest.Request.SetConfiguration(new HttpConfiguration());
 }
 public TestableHtmlGenerator(
     IModelMetadataProvider metadataProvider,
     IScopedInstance<ActionBindingContext> bindingContextAccessor,
     IUrlHelper urlHelper,
     IDictionary<string, object> validationAttributes)
     : base(GetAntiForgery(), bindingContextAccessor, metadataProvider, urlHelper, new HtmlEncoder())
 {
     _validationAttributes = validationAttributes;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapService" /> class.
 /// </summary>
 /// <param name="loggingService">The logging service.</param>
 /// <param name="memoryCache">The memory cache for the application.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapService(
     ILoggingService loggingService,
     IMemoryCache memoryCache,
     IUrlHelper urlHelper)
 {
     this.loggingService = loggingService;
     this.memoryCache = memoryCache;
     this.urlHelper = urlHelper;
 }
 public TestableHtmlGenerator(
     IModelMetadataProvider metadataProvider,
     IOptions<MvcViewOptions> options,
     IUrlHelper urlHelper,
     IDictionary<string, object> validationAttributes)
     : base(GetAntiForgery(), options, metadataProvider, urlHelper, new CommonTestEncoder())
 {
     _validationAttributes = validationAttributes;
 }
 public ContentLinkTagHelper(
     IContentManager contentManager, 
     IUrlHelper urlHelper,
     IContentDefinitionManager contentDefinitionManager)
 {
     _contentDefinitionManager = contentDefinitionManager;
     // TODO: Change to IUrlHelperFactory in RC2
     _urlHelper = urlHelper;
     _contentManager = contentManager;
 }
Esempio n. 27
0
 /// <summary>
 /// Creates a new <see cref="ImageTagHelper"/>.
 /// </summary>
 /// <param name="hostingEnvironment">The <see cref="IHostingEnvironment"/>.</param>
 /// <param name="cache">The <see cref="IMemoryCache"/>.</param>
 /// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param>
 public ImageTagHelper(
     IHostingEnvironment hostingEnvironment,
     IMemoryCache cache,
     IHtmlEncoder htmlEncoder,
     IUrlHelper urlHelper)
     : base(urlHelper, htmlEncoder)
 {
     HostingEnvironment = hostingEnvironment;
     Cache = cache;
 }
Esempio n. 28
0
 public async Task<Menu> GetMenuAsync(string menuId, IUrlHelper urlHelper)
 {
     var navigation = Navigations.FirstOrDefault(t => t.Id.Equals(menuId, StringComparison.OrdinalIgnoreCase));
     if (navigation != null)
     {
         return FinishMenu(navigation, urlHelper);
     }
     
     throw new Exception(_sr.GetString("Menu with id: '{0}' not found2.", menuId));
 }
Esempio n. 29
0
        public void Setup()
        {
            _staticPageRepository = MockRepository.GenerateStub<IStaticPageRepository>();
            _urlHelper = MockRepository.GenerateStub<IUrlHelper>();
            _staticContentLinkService = MockRepository.GenerateStub<IStaticContentLinkService>();
            _staticPageService = new StaticPageService(_staticPageRepository);
            _objectUnderTest = new StaticPageController(_staticPageService, _staticContentLinkService, _urlHelper);

            _objectUnderTest.Request = new HttpRequestMessage();
            _objectUnderTest.Request.SetConfiguration(new HttpConfiguration());
        }
Esempio n. 30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapService" /> class.
 /// </summary>
 /// <param name="cacheProfileSettings">The cache profile settings.</param>
 /// <param name="distributedCache">The distributed cache for the application.</param>
 /// <param name="logger">The <see cref="SitemapService"/> logger.</param>
 /// <param name="urlHelper">The URL helper.</param>
 public SitemapService(
     IOptions<CacheProfileSettings> cacheProfileSettings,
     IDistributedCache distributedCache,
     ILogger<SitemapService> logger,
     IUrlHelper urlHelper)
 {
     CacheProfile cacheProfile = cacheProfileSettings.Value.CacheProfiles[CacheProfileName.SitemapNodes];
     this.expirationDuration = TimeSpan.FromSeconds(cacheProfile.Duration.Value);
     this.distributedCache = distributedCache;
     this.logger = logger;
     this.urlHelper = urlHelper;
 }
Esempio n. 31
0
 public BooksController(ILibraryRepository repository, ILogger <BooksController> logger, IUrlHelper urlHelper)
 {
     Repository = repository;
     Logger     = logger;
     UrlHelper  = urlHelper;
 }
        public override object Display(WidgetDisplayContext widgetDisplayContext)
        {
            var currentWidget = widgetDisplayContext.Widget as NavigationWidget;
            var actionContext = widgetDisplayContext.ActionContext;
            var navs          = _navigationService.Get()
                                .Where(m => m.Status == (int)RecordStatus.Active).OrderBy(m => m.DisplayOrder).ToList();

            string     path      = null;
            IUrlHelper urlHelper = null;

            if (ApplicationContext.As <CMSApplicationContext>().IsDesignMode)
            {
                var layout = widgetDisplayContext.PageLayout;
                if (layout != null && layout.Page != null)
                {
                    path = layout.Page.Url.Replace("~/", "/");
                }
            }
            else if (actionContext is ActionExecutedContext)
            {
                path      = (actionContext as ActionExecutedContext).HttpContext.Request.Path.Value.Replace(".html", string.Empty);
                urlHelper = ((actionContext as ActionExecutedContext).Controller as Controller).Url;
            }
            if (urlHelper == null && (actionContext is ActionExecutedContext))
            {
                urlHelper = ((actionContext as ActionExecutedContext).Controller as Controller).Url;
            }

            if (path != null)
            {
                NavigationEntity current = null;
                int length = 0;
                foreach (var navigationEntity in navs)
                {
                    string url = (navigationEntity.Url ?? "~/").Replace(".html", string.Empty);
                    if (urlHelper != null)
                    {
                        url = urlHelper.Content(url);
                    }
                    else
                    {
                        url = url.Replace("~/", "/");
                    }
                    if (path.IndexOf(url, StringComparison.OrdinalIgnoreCase) == 0 && length < url.Length)
                    {
                        current = navigationEntity;
                        length  = url.Length;
                    }
                }
                if (current != null)
                {
                    current.IsCurrent = true;
                }
            }


            if (currentWidget.RootID.IsNullOrEmpty() || currentWidget.RootID == "root")
            {
                currentWidget.RootID = "#";
            }
            return(new NavigationWidgetViewModel(navs, currentWidget));
        }
 public static string PegarUrlConfirmacaoEmail(this IUrlHelper urlHelper, string usuarioId, string codigo, string esquema)
 {
     return(urlHelper.Page("/Conta/ConfirmacaoEmail", null, new { userId = usuarioId, code = codigo }, esquema));
 }
 public ProductController(IUrlHelper urlHelper)
 {
     _urlHelper = urlHelper;
 }
 public RootController(IUrlHelper urlHelper)
 {
     c_urlHelper = urlHelper;
 }
Esempio n. 36
0
 public SearchUrlManager(IUrlHelper urlHelper, IOptions <AppSettings> appSettings) : base(urlHelper, appSettings)
 {
 }
Esempio n. 37
0
 public static string PageUrl(this IUrlHelper urlHelper, long pageId, string pageName, bool home, IEnumerable<string> tagNames, object values)
 {
     return GetRouteUrl(urlHelper, pageId, pageName, home, tagNames, values);
 }
Esempio n. 38
0
 public HowToHelpEnricher(IUrlHelper urlHelper)
 {
     _urlHelper = urlHelper;
 }
Esempio n. 39
0
 public MoviesController(IMovieService _movieService, IUrlHelper _urlHelper)
 {
     movieService = _movieService;
     urlHelper    = _urlHelper;
 }
 public CreateApiResourceLink(IUrlHelper url, ApiResourceMetaData apiResourceMetaData)
 {
     this["href"] = url.RelativeLink(Constants.RouteNames.CreateApiResource);
     this["meta"] = apiResourceMetaData.CreateProperties;
 }
Esempio n. 41
0
 public HomeController(IDistributedCache cache, IHomeAppService homeAppService, IUrlHelper urlHelper)
 {
     _cache          = cache;
     _homeAppService = homeAppService;
     _homeEnricher   = new HomeEnricher(urlHelper);
 }
Esempio n. 42
0
 public BooksController(ILibraryRepository libraryRepository, ILogger <BooksController> logger, IUrlHelper urlHelper)
 {
     _logger            = logger;
     _libraryRepository = libraryRepository;
     _urlHelper         = urlHelper;
 }
Esempio n. 43
0
        public static InputTextMessageContent GetMessageText(this Poll poll, IUrlHelper urlHelper, ParseMode mode = Helpers.DefaultParseMode, bool disableWebPreview = false)
        {
            var text = poll.GetDescription(urlHelper, mode).NewLine();

            text.Append(" "); // for better presentation in telegram pins & notifications

            if (poll.Cancelled)
            {
                text
                .NewLine()
                .Bold((builder, m) => builder.Sanitize("Cancellation!", m).NewLine(), mode);
            }

            var compactMode = poll.Votes?.Count > 10;
            var pollVotes   = poll.Votes ?? Enumerable.Empty <Vote>();

            GroupVotes(text, pollVotes, ourVoteGrouping);

            text.Link("\x200B", poll.Raid()?.GetLink(urlHelper), mode);

            return(text.ToTextMessageContent(mode, disableWebPreview));

            int GroupVotes(StringBuilder result, IEnumerable <Vote> enumerable, IEnumerable <VoteGrouping> grouping, string extraPhrase = null)
            {
                int groupsCount = 0;

                foreach (var voteGroup in enumerable
                         .GroupBy(vote => grouping.OrderBy(_ => _.Order).FirstOrDefault(_ => vote.Team?.HasAnyFlags(_.Flag) ?? false))
                         .OrderBy(voteGroup => voteGroup.Key.DisplayOrder))
                {
                    groupsCount++;
                    var votesNumber = voteGroup.Aggregate(0, (i, vote) => i + vote.Team.GetPlusVotesCount() + 1);
                    var countStr    = votesNumber == 1 ? voteGroup.Key.Singular : voteGroup.Key.Plural;
                    StringBuilder FormatCaption(StringBuilder sb)
                    {
                        var captionParts = new[] { votesNumber.ToString(), extraPhrase, countStr }.Where(s => !string.IsNullOrWhiteSpace(s));

                        return(sb
                               .NewLine()
                               .Sanitize(string.Join(" ", captionParts), mode)
                               .NewLine());
                    }

                    if (voteGroup.Key.NestedGrouping is {} nestedGrouping)
                    {
                        var nestedResult = new StringBuilder();
                        if (GroupVotes(nestedResult, voteGroup, nestedGrouping) > 1)
                        {
                            FormatCaption(result).Append(nestedResult);
                        }
                        else
                        {
                            GroupVotes(result, voteGroup, nestedGrouping, countStr);
                        }
                        continue;
                    }

                    FormatCaption(result);

                    foreach (var vote in voteGroup.GroupBy(_ => _.Team?.RemoveFlags(VoteEnum.Modifiers)).OrderBy(_ => _.Key))
                    {
                        var votes = vote.OrderBy(v => v.Modified);
                        if (compactMode)
                        {
                            result
                            .Sanitize(vote.Key?.Description()).Append('\x00A0')
                            .AppendJoin(", ", votes.Select(v => v.GetUserLinkWithPluses(mode)))
                            .NewLine();
                        }
                        else
                        {
                            result
                            .AppendJoin(Helpers.NewLineString,
                                        votes.Select(v => $"{v.Team?.Description().Sanitize(mode)} {v.GetUserLinkWithPluses(mode)}"))
                            .NewLine();
                        }
                    }
                }

                return(groupsCount);
            }
        }
Esempio n. 44
0
 public WhoAreWeController(IDistributedCache cache, IWhoAreWeAppService whoAreWeAppService, IUrlHelper urlHelper)
 {
     _cache = cache;
     _whoAreWeAppService = whoAreWeAppService;
     _whoAreWeEnricher   = new WhoAreWeEnricher(urlHelper);
 }
Esempio n. 45
0
 public AuthorsController(ILibraryRepository LibraryRepository, ILogger <AuthorsController> Logger, IUrlHelper UrlHelper,
                          IPropertyMappingService PropertyMappingService, ITypeHelperService TypeHelperService)
 {
     libraryRepository      = LibraryRepository;
     logger                 = Logger;
     urlHelper              = UrlHelper;
     propertyMappingService = PropertyMappingService;
     typeHelperService      = TypeHelperService;
 }
Esempio n. 46
0
 public UserService(IContractOperations contractOperations, IHolidayOperations holidayOperations, IUserOperations userOperations, IWorkTimeOperations workTimeOperations, IDepartmentOperations departmentOperations, IUrlHelper urlHelper)
 {
     _contractOperations   = contractOperations;
     _holidayOperations    = holidayOperations;
     _userOperations       = userOperations;
     _workTimeOperations   = workTimeOperations;
     _departmentOperations = departmentOperations;
     _urlHelper            = urlHelper;
 }
Esempio n. 47
0
 public RegisterMemberController(IUrlHelper urlHelper, IMemberRegistration memberRegistration)
 {
     _memberRegistration = memberRegistration;
     _urlHelper          = urlHelper;
 }
Esempio n. 48
0
        /// <summary>
        /// Generates a fully qualified URL to an action method by using
        /// the specified action name, controller name and route values.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="actionName">The name of the action method.</param>
        /// <param name="controllerName">The name of the controller.</param>
        /// <param name="routeValues">The route values.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteAction(this IUrlHelper url, string actionName, string controllerName, object routeValues = null)
        {
            string scheme = url.ActionContext.HttpContext.Request.Scheme;

            return(url.Action(actionName, controllerName, routeValues, scheme));
        }
Esempio n. 49
0
 public FoodsController(IUrlHelper urlHelper, IFoodRepository foodRepository)
 {
     _foodRepository = foodRepository;
     _urlHelper      = urlHelper;
 }
Esempio n. 50
0
 public PagerTagHelper(IHttpContextAccessor accessor, IActionContextAccessor actionContextAccessor, IUrlHelperFactory urlHelperFactory)
 {
     _httpContext = accessor.HttpContext;
     _urlHelper   = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
 }
Esempio n. 51
0
 /// <summary>
 /// Creates a new <see cref="UrlResolutionTagHelper"/>.
 /// </summary>
 /// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param>
 /// <param name="htmlEncoder">The <see cref="IHtmlEncoder"/>.</param>
 public UrlResolutionTagHelper(IUrlHelper urlHelper, IHtmlEncoder htmlEncoder)
 {
     UrlHelper   = urlHelper;
     HtmlEncoder = htmlEncoder;
 }
Esempio n. 52
0
 public ArticlesController(IUnitOfWork unitOfWork, IAccountManager accountManager,
                           IAuthorizationService authorizationService, IFileHandler fileHandler, IUrlHelper urlHelper,
                           IArticlePropertyMapping propertyMappingService, ITypeMappingHelper typeMappingHelper)
 {
     _unitOfWork             = unitOfWork;
     _accountManager         = accountManager;
     _authorizationService   = authorizationService;
     _fileHandler            = fileHandler;
     _urlHelper              = urlHelper;
     _articlePropertyMapping = propertyMappingService;
     _typeMappingHelper      = typeMappingHelper;
 }
 public CourseController(ICourseRepository courseRepository, IContentRepository contentRepository, IDiscussionBoardRepository discussionBoardRepository, IMapper mapper, IUrlHelper urlHelper, IOptions <AppSettings> appSettings)
 {
     _courseRepository          = courseRepository;
     _contentRepository         = contentRepository;
     _discussionBoardRepository = discussionBoardRepository;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
     _urlHelper   = urlHelper;
 }
Esempio n. 54
0
 public FlightSearchLocationController(IFlightSearchApplicationService flightSearchService, IMapper mapper, IEmailService emailService, IUrlHelper urlHelper, AppSettings appSettings, IAuthorizationService authorizationService)
     : base("flight.search.location.", mapper, emailService, urlHelper, appSettings, authorizationService)
 {
     _flightSearchService = flightSearchService;
 }
 public UrlPropertyHandlerTests()
 {
     this._contentSerializerSettings = new ContentSerializerSettings();
     this._urlHelper = Substitute.For <IUrlHelper>();
     this._sut       = new UrlPropertyHandler(this._urlHelper, _contentSerializerSettings);
 }
 public static string PegarUrlRedefinicaoSenha(this IUrlHelper urlHelper, string usuarioId, string codigo, string esquema)
 {
     return(urlHelper.Page("/Conta/RedefinirSenha", null, new { userId = usuarioId, code = codigo }, esquema));
 }
 public OutstandingInvoiceService(IUnitOfWorkFactory unitOfWorkFactory, IXmlHelper XmlHelper, IUrlHelper urlHelper) : base(unitOfWorkFactory)
 {
     this.unitOfWork = unitOfWorkFactory;
     customSettings  = new CustomSettings();
     this.xmlHelper  = XmlHelper;
     this.UrlHelper  = urlHelper;
 }
 public static string PegarUrlLocal(this IUrlHelper urlHelper, string url)
 {
     return(urlHelper.IsLocalUrl(url) ? url : urlHelper.Page("/Index"));
 }
Esempio n. 59
0
        //const int maxAuthorPageSize = 20;

        public AuthorsController(ILibraryRepository libraryRepository, IUrlHelper urlHelper)
        {
            _libraryRepository = libraryRepository;
            _urlHelper         = urlHelper;
        }