当前位置: 首页>>代码示例>>C#>>正文


C# IUrlHelper类代码示例

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


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


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