• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IUrlHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IUrlHelper的典型用法代码示例。如果您正苦于以下问题:C# IUrlHelper类的具体用法?C# IUrlHelper怎么用?C# IUrlHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IUrlHelper类属于命名空间,在下文中一共展示了IUrlHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AlphaPagerTagHelper

        public AlphaPagerTagHelper(
            IUrlHelper urlHelper,
            IHtmlGenerator generator)
        {
            Generator = generator;

        }
开发者ID:dwhood,项目名称:cloudscribe.Web.Pagination,代码行数:7,代码来源:AlphaPagerTagHelper.cs


示例2: ManifestService

 public ManifestService(
     IOptions<AppSettings> appSettings,
     IUrlHelper urlHelper)
 {
     this.appSettings = appSettings;
     this.urlHelper = urlHelper;
 }
开发者ID:Pro-Coded,项目名称:Pro.MVCMagic,代码行数:7,代码来源:ManifestService.cs


示例3: NavigationViewModel

        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);



        }
开发者ID:ruelbtit2014,项目名称:cloudscribe,代码行数:26,代码来源:NavigationViewModel.cs


示例4: GetDataSeriesArray

        /// <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 }
                    )
                }
            );
        }
开发者ID:CSClassroom,项目名称:CSClassroom,代码行数:30,代码来源:TestTrendViewModel.cs


示例5: FileSystemHelper

 public FileSystemHelper(IApplicationEnvironment appEnv, IHostingEnvironment hostingEnv, ISmidgeConfig config, IUrlHelper urlHelper)
 {
     _appEnv = appEnv;
     _config = config;
     _urlHelper = urlHelper;
     _hostingEnv = hostingEnv;
 }
开发者ID:eByte23,项目名称:Smidge,代码行数:7,代码来源:FileSystemHelper.cs


示例6: UsersController

 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;
 }
开发者ID:markashleybell,项目名称:MABMoney,代码行数:26,代码来源:UsersController.cs


示例7: OrganizationApiController

 public OrganizationApiController(IBus bus, IDocumentSession session, IMapper mapper, IUrlHelper urlHelper)
 {
     _bus = bus;
     _session = session;
     _mapper = mapper;
     _urlHelper = urlHelper;
 }
开发者ID:sjclark76,项目名称:ActiveEdge,代码行数:7,代码来源:OrganizationApiController.cs


示例8: NavigationViewModel

        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);



        }
开发者ID:joeaudette,项目名称:cloudscribe.Web.Navigation,代码行数:32,代码来源:NavigationViewModel.cs


示例9: ComponentTagHelper

 public ComponentTagHelper(IHttpContextAccessor contextAccessor, IBricsContextAccessor bricsContext)
 {
     _contextAccessor = contextAccessor;
     _bricsContext = bricsContext;
     _urlHelper = contextAccessor.HttpContext.RequestServices.GetService<IUrlHelper>();
     _htmlHelper = contextAccessor.HttpContext.RequestServices.GetService<IHtmlHelper>();
 }
开发者ID:marcuslindblom,项目名称:aspnet5,代码行数:7,代码来源:ComponentTagHelper.cs


示例10: DefaultUrlManager

 public DefaultUrlManager(IOptions<SmidgeOptions> options, ISmidgeConfig config, IHasher hasher, IUrlHelper urlHelper)
 {
     _hasher = hasher;
     _urlHelper = urlHelper;
     _options = options.Value.UrlOptions;
     _config = config;
 }
开发者ID:eByte23,项目名称:Smidge,代码行数:7,代码来源:DefaultUrlManager.cs


示例11: OpenSearchService

 public OpenSearchService(
     IOptions<AppSettings> appSettings,
     IUrlHelper urlHelper)
 {
     this.appSettings = appSettings;
     this.urlHelper = urlHelper;
 }
开发者ID:netusers2014,项目名称:ASP.NET-MVC-Boilerplate,代码行数:7,代码来源:OpenSearchService.cs


示例12: FeedService

 /// <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();
 }
开发者ID:Pro-Coded,项目名称:Pro.MVCMagic,代码行数:13,代码来源:FeedService.cs


示例13: TestableHtmlGenerator

 public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper)
     : this(
           metadataProvider,
           Mock.Of<IScopedInstance<ActionBindingContext>>(),
           urlHelper,
           validationAttributes: new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase))
 {
 }
开发者ID:AndersBillLinden,项目名称:Mvc,代码行数:8,代码来源:TestableHtmlGenerator.cs


示例14: AddBackofficeBottom

        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);
        }
开发者ID:mitsbits,项目名称:Ubik,代码行数:8,代码来源:BackofficePage.cs


示例15: SitemapPingerService

 /// <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();
 }
开发者ID:netusers2014,项目名称:ASP.NET-MVC-Boilerplate,代码行数:13,代码来源:SitemapPingerService.cs


示例16: SitemapPingerService

 /// <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();
 }
开发者ID:razormad,项目名称:ASP.NET-MVC-Boilerplate,代码行数:13,代码来源:SitemapPingerService.cs


示例17: FinishMenu

 private Menu FinishMenu(MenuDefinition menuDefinition, IUrlHelper urlHelper)
 {
     var menu = new Menu(menuDefinition.Id)
     {
         Items = MapItems(menuDefinition.Items, urlHelper)
     };
     return menu;
 }
开发者ID:causer,项目名称:Itasu,代码行数:8,代码来源:NavigationManager.cs


示例18: TestableHtmlGenerator

 public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper)
     : this(
           metadataProvider,
           GetOptions(),
           urlHelper,
           validationAttributes: new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase))
 {
 }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:8,代码来源:TestableHtmlGenerator.cs


示例19: ErrorController

 public ErrorController(IUrlHelper urlHelper)
 {
     if (urlHelper == null)
     {
         throw new ArgumentNullException("manager");
     }
     this.urlHelper = urlHelper;
 }
开发者ID:luiseduardohdbackup,项目名称:TestMvcApplication,代码行数:8,代码来源:ErrorController.cs


示例20: SitemapPingerService

 /// <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();
 }
开发者ID:MarcusPozzan,项目名称:ASP.NET-MVC-Boilerplate,代码行数:13,代码来源:SitemapPingerService.cs



注:本文中的IUrlHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IUrlParser类代码示例发布时间:2022-05-24
下一篇:
C# IUrlGenerator类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap