diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cs deleted file mode 100644 index 44f97819ce..0000000000 --- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cs +++ /dev/null @@ -1,73 +0,0 @@ -namespace Microsoft.AspNet.Diagnostics.Views -{ -#line 1 "DiagnosticsPage.cshtml" -using System - -#line default -#line hidden - ; -#line 2 "DiagnosticsPage.cshtml" -using System.Globalization - -#line default -#line hidden - ; - using System.Threading.Tasks; - - public class DiagnosticsPage : Microsoft.AspNet.Diagnostics.Views.BaseView - { - #line hidden - public DiagnosticsPage() - { - } - - #pragma warning disable 1998 - public override async Task ExecuteAsync() - { -#line 3 "DiagnosticsPage.cshtml" - - Response.ContentType = "text/html"; - string error = Request.Query["error"]; - if (!string.IsNullOrWhiteSpace(error)) - { - throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "User requested error '{0}'", error)); - } - -#line default -#line hidden - - WriteLiteral("\r\n\r\n\r\n\r\n\r\n \r\n "); -#line 16 "DiagnosticsPage.cshtml" - Write(Resources.DiagnosticsPageHtml_Title); - -#line default -#line hidden - WriteLiteral("\r\n\r\n\r\n
\r\n

"); -#line 20 "DiagnosticsPage.cshtml" - Write(Resources.DiagnosticsPageHtml_Title); - -#line default -#line hidden - WriteLiteral("

\r\n

"); -#line 21 "DiagnosticsPage.cshtml" - Write(Resources.DiagnosticsPageHtml_Information); - -#line default -#line hidden - WriteLiteral("

\r\n
\r\n
\r\n

"); -#line 24 "DiagnosticsPage.cshtml" - Write(Resources.DiagnosticsPageHtml_TestErrorSection); - -#line default -#line hidden - WriteLiteral("

\r\n

(Request.PathBase, 770), false), - Tuple.Create(Tuple.Create("", 787), Tuple.Create(Request.Path, 787), false), Tuple.Create(Tuple.Create("", 800), Tuple.Create("?error=", 800), true), - Tuple.Create(Tuple.Create("", 807), Tuple.Create(Resources.DiagnosticsPageHtml_TestErrorMessage, 807), false)); - WriteLiteral(">throw InvalidOperationException

\r\n
\r\n\r\n\r\n"); - } - #pragma warning restore 1998 - } -} diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cshtml b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cshtml deleted file mode 100644 index 41099f3dde..0000000000 --- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPage.cshtml +++ /dev/null @@ -1,28 +0,0 @@ -@using System -@using System.Globalization -@{ - Response.ContentType = "text/html"; - string error = Request.Query["error"]; - if (!string.IsNullOrWhiteSpace(error)) - { - throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "User requested error '{0}'", error)); - } -} - - - - - - @Resources.DiagnosticsPageHtml_Title - - -
-

@Resources.DiagnosticsPageHtml_Title

-

@Resources.DiagnosticsPageHtml_Information

-
-
-

@Resources.DiagnosticsPageHtml_TestErrorSection

-

throw InvalidOperationException

-
- - diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageExtensions.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageExtensions.cs deleted file mode 100644 index 17da1ee340..0000000000 --- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageExtensions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - - -#if DIAGNOSTICS_PAGE_MIDDLEWARE -using System; -using Microsoft.AspNet.Abstractions; -using Microsoft.AspNet.Diagnostics; -using Microsoft.Framework.Internal; - -namespace Microsoft.AspNet.Builder -{ - /// - /// IApplicationBuilder extensions for the DiagnosticsPageMiddleware. - /// - public static class DiagnosticsPageExtensions - { - /// - /// Adds the DiagnosticsPageMiddleware to the pipeline with the given options. - /// - /// - /// - /// - public static IApplicationBuilder UseDiagnosticsPage([NotNull] this IApplicationBuilder builder, DiagnosticsPageOptions options) - { - return builder.Use(next => new DiagnosticsPageMiddleware(next, options).Invoke); - } - - /// - /// Adds the DiagnosticsPageMiddleware to the pipeline with the given path. - /// - /// - /// - /// - public static IApplicationBuilder UseDiagnosticsPage(this IApplicationBuilder builder, PathString path) - { - return UseDiagnosticsPage(builder, new DiagnosticsPageOptions { Path = path }); - } - - /// - /// Adds the DiagnosticsPageMiddleware to the pipeline. - /// - /// - /// - public static IApplicationBuilder UseDiagnosticsPage(this IApplicationBuilder builder) - { - return UseDiagnosticsPage(builder, new DiagnosticsPageOptions()); - } - } -} -#endif \ No newline at end of file diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageMiddleware.cs deleted file mode 100644 index feba18875e..0000000000 --- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageMiddleware.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - - -#if DIAGNOSTICS_PAGE_MIDDLEWARE -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Diagnostics.Views; -using Microsoft.AspNet.Http; - -namespace Microsoft.AspNet.Diagnostics -{ - /// - /// A human readable page with basic debugging actions. - /// - public class DiagnosticsPageMiddleware - { - private readonly RequestDelegate _next; - private readonly DiagnosticsPageOptions _options; - - /// - /// Initializes a new instance of the class - /// - /// - /// - public DiagnosticsPageMiddleware(RequestDelegate next, DiagnosticsPageOptions options) - { - _next = next; - _options = options; - } - - /// - /// Process an individual request. - /// - /// - /// - public Task Invoke(HttpContext context) - { - if (!_options.Path.HasValue || _options.Path == context.Request.Path) - { - var page = new DiagnosticsPage(); - page.Execute(context); - return Task.FromResult(0); - } - return _next(context); - } - } -} -#endif \ No newline at end of file diff --git a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageOptions.cs b/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageOptions.cs deleted file mode 100644 index 50f448335e..0000000000 --- a/src/Microsoft.AspNet.Diagnostics/DiagnosticsPage/DiagnosticsPageOptions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - - -#if DIAGNOSTICS_PAGE_MIDDLEWARE - -using Microsoft.AspNet.Http; - -namespace Microsoft.AspNet.Diagnostics -{ - /// - /// Options for the DiagnosticsPageMiddleware - /// - public class DiagnosticsPageOptions - { - /// - /// Specifies which requests paths will be responded to. Exact matches only. Leave null to handle all requests. - /// - public PathString Path { get; set; } - } -} -#endif \ No newline at end of file