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


C# IApplicationBuilder.UseErrorReporter方法代码示例

本文整理汇总了C#中IApplicationBuilder.UseErrorReporter方法的典型用法代码示例。如果您正苦于以下问题:C# IApplicationBuilder.UseErrorReporter方法的具体用法?C# IApplicationBuilder.UseErrorReporter怎么用?C# IApplicationBuilder.UseErrorReporter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IApplicationBuilder的用法示例。


在下文中一共展示了IApplicationBuilder.UseErrorReporter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "isbn10",
                    template: "book/{action}/{isbnNumber:IsbnDigitScheme10(true)}",
                    defaults: new { controller = "InlineConstraints_Isbn10" });

                routes.MapRoute("StoreId",
                        "store/{action}/{id:guid?}",
                        defaults: new { controller = "InlineConstraints_Store" });

                routes.MapRoute("StoreLocation",
                        "store/{action}/{location:minlength(3):maxlength(10)}",
                        defaults: new { controller = "InlineConstraints_Store" },
                        constraints: new { location = new AlphaRouteConstraint() });

                // Used by tests for the 'exists' constraint.
                routes.MapRoute("areaExists-area", "area-exists/{area:exists}/{controller=Home}/{action=Index}");
                routes.MapRoute("areaExists", "area-exists/{controller=Home}/{action=Index}");
                routes.MapRoute("areaWithoutExists-area", "area-withoutexists/{area}/{controller=Home}/{action=Index}");
                routes.MapRoute("areaWithoutExists", "area-withoutexists/{controller=Home}/{action=Index}");
            });
        }
开发者ID:RehanSaeed,项目名称:Mvc,代码行数:29,代码来源:Startup.cs

示例2: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            app.UseMvc(routes =>
            {
                routes.MapRoute("areaRoute",
                                "{area:exists}/{controller}/{action}",
                                new { controller = "Home", action = "Index" });

                routes.MapRoute("ActionAsMethod", "{controller}/{action}",
                    defaults: new { controller = "Home", action = "Index" });

                routes.MapRoute(
                    "products",
                    "api/Products/{country}/{action}",
                    defaults: new { controller = "Products" });

                // Added this route to validate that we throw an exception when a conventional
                // route matches a link generated by a named attribute route.
                // The conventional route will match first, but when the attribute route generates
                // a valid route an exception will be thrown.
                routes.MapRoute(
                    "DuplicateRoute",
                    "conventional/Duplicate",
                    defaults: new { controller = "Duplicate", action = "Duplicate" });

                routes.MapRoute(
                    "RouteWithOptionalSegment",
                    "{controller}/{action}/{path?}");
            });
        }
开发者ID:huoxudong125,项目名称:Mvc,代码行数:34,代码来源:Startup.cs

示例3: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            // Add MVC to the request pipeline
            app.UseMvcWithDefaultRoute();
        }
开发者ID:4myBenefits,项目名称:Mvc,代码行数:9,代码来源:Startup.cs

示例4: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            app.UseMiddleware<AuthorizeBasicMiddleware>("Interactive");
            app.UseMiddleware<AuthorizeBasicMiddleware>("Api");

            app.UseMvcWithDefaultRoute();
        }
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:11,代码来源:Startup.cs

示例5: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            app.UseMvc(routes =>
            {
                routes.MapRoute("ActionAsMethod", "{controller}/{action}",
                    defaults: new { controller = "Home", action = "Index" });
            });
        }
开发者ID:notami18,项目名称:Mvc,代码行数:12,代码来源:Startup.cs

示例6: Configure

        public void Configure(IApplicationBuilder app)
        {
            app.UseCultureReplacer();

            app.UseErrorReporter();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller}/{action}/{id?}");
            });
        }
开发者ID:ryanbrandenburg,项目名称:Mvc,代码行数:13,代码来源:Startup.cs


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