From e450dd707eb1a956a9ad24daf80c2a2cf13a9d6c Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Mon, 17 Apr 2017 13:43:26 -0700 Subject: [PATCH] Deleted obsolete razor views and models --- .../Views/Obsolete/DatabaseErrorPage.cs | 367 ------- .../Views/Obsolete/DatabaseErrorPage.cshtml | 135 --- .../Views/Obsolete/DatabaseErrorPageModel.cs | 73 -- .../exceptions.net45.json | 10 + .../exceptions.netcore.json | 10 + .../Views/Obsolete/CompilationErrorModel.cs | 26 - .../Views/Obsolete/CompilationErrorPage.cs | 404 -------- .../Obsolete/CompilationErrorPage.cshtml | 100 -- .../Views/Obsolete/ErrorDetails.cs | 30 - .../Views/Obsolete/ErrorPage.cs | 902 ------------------ .../Views/Obsolete/ErrorPage.cshtml | 262 ----- .../Views/Obsolete/ErrorPage.css | 195 ---- .../Views/Obsolete/ErrorPage.js | 192 ---- .../Views/Obsolete/ErrorPageModel.cs | 43 - .../Views/Obsolete/StackFrame.cs | 57 -- .../Views/Obsolete/StackFrameInfo.cs | 56 -- .../exceptions.net45.json | 30 + .../exceptions.netcore.json | 30 + 18 files changed, 80 insertions(+), 2842 deletions(-) delete mode 100644 src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cshtml delete mode 100644 src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPageModel.cs create mode 100644 src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.net45.json create mode 100644 src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.netcore.json delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorModel.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cshtml delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorDetails.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.cshtml delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.css delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.js delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPageModel.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/StackFrame.cs delete mode 100644 src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/StackFrameInfo.cs create mode 100644 src/Microsoft.AspNetCore.Diagnostics/exceptions.net45.json create mode 100644 src/Microsoft.AspNetCore.Diagnostics/exceptions.netcore.json diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cs b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cs deleted file mode 100644 index 9d648a4a05..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cs +++ /dev/null @@ -1,367 +0,0 @@ -namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views -{ -#line 1 "DatabaseErrorPage.cshtml" -using System - -#line default -#line hidden - ; -#line 2 "DatabaseErrorPage.cshtml" -using System.Linq - -#line default -#line hidden - ; -#line 3 "DatabaseErrorPage.cshtml" -using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore - -#line default -#line hidden - ; -#line 4 "DatabaseErrorPage.cshtml" -using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views - -#line default -#line hidden - ; - using System.Threading.Tasks; - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class DatabaseErrorPage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView - { -#line 11 "DatabaseErrorPage.cshtml" - - public DatabaseErrorPageModel Model { get; set; } - - public string UrlEncode(string content) - { - return UrlEncoder.Encode(content); - } - - public string JavaScriptEncode(string content) - { - return JavaScriptEncoder.Encode(content); - } - -#line default -#line hidden - #line hidden - public DatabaseErrorPage() - { - } - - #pragma warning disable 1998 - public override async Task ExecuteAsync() - { -#line 5 "DatabaseErrorPage.cshtml" - - Response.StatusCode = 500; - Response.ContentType = "text/html"; - Response.ContentLength = null; // Clear any prior Content-Length - -#line default -#line hidden - - WriteLiteral("\r\n\r\n\r\n\r\n \r\n Internal Server Error\r\n \r\n\r\n\r\n

"); -#line 35 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_Title); - -#line default -#line hidden - WriteLiteral("

\r\n

\r\n"); -#line 37 "DatabaseErrorPage.cshtml" - - -#line default -#line hidden - -#line 37 "DatabaseErrorPage.cshtml" - for (Exception ex = Model.Exception; ex != null; ex = ex.InnerException) - { - -#line default -#line hidden - - WriteLiteral(" "); -#line 39 "DatabaseErrorPage.cshtml" - Write(ex.GetType().Name); - -#line default -#line hidden - WriteLiteral(": "); -#line 39 "DatabaseErrorPage.cshtml" - Write(ex.Message); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n"); -#line 41 "DatabaseErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral("

\r\n
\r\n\r\n"); -#line 45 "DatabaseErrorPage.cshtml" - - -#line default -#line hidden - -#line 45 "DatabaseErrorPage.cshtml" - if (!Model.DatabaseExists && !Model.PendingMigrations.Any()) - { - -#line default -#line hidden - - WriteLiteral("

"); -#line 47 "DatabaseErrorPage.cshtml" - Write(Strings.FormatDatabaseErrorPage_NoDbOrMigrationsTitle(Model.ContextType.Name)); - -#line default -#line hidden - WriteLiteral("

\r\n

"); -#line 48 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_NoDbOrMigrationsInfoPMC); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 49 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_AddMigrationCommandPMC); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n "); -#line 51 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC); - -#line default -#line hidden - WriteLiteral("\r\n

"); -#line 52 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_NoDbOrMigrationsInfoCLI); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 53 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_AddMigrationCommandCLI); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n "); -#line 55 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n"); -#line 57 "DatabaseErrorPage.cshtml" - } - else if (Model.PendingMigrations.Any()) - { - -#line default -#line hidden - - WriteLiteral("
\r\n

"); -#line 61 "DatabaseErrorPage.cshtml" - Write(Strings.FormatDatabaseErrorPage_PendingMigrationsTitle(Model.ContextType.Name)); - -#line default -#line hidden - WriteLiteral("

\r\n

"); -#line 62 "DatabaseErrorPage.cshtml" - Write(Strings.FormatDatabaseErrorPage_PendingMigrationsInfo(Model.ContextType.Name)); - -#line default -#line hidden - WriteLiteral("

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

\r\n - - -

- \r\n\r\n

"); -#line 112 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_HowToApplyFromPMC); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 113 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC); - -#line default -#line hidden - WriteLiteral("\r\n

"); -#line 114 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_HowToApplyFromCLI); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 115 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n
\r\n"); -#line 118 "DatabaseErrorPage.cshtml" - } - else if (Model.PendingModelChanges) - { - -#line default -#line hidden - - WriteLiteral("
\r\n

"); -#line 122 "DatabaseErrorPage.cshtml" - Write(Strings.FormatDatabaseErrorPage_PendingChangesTitle(Model.ContextType.Name)); - -#line default -#line hidden - WriteLiteral("

\r\n

"); -#line 123 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_PendingChangesInfoPMC); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 124 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_AddMigrationCommandPMC); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n "); -#line 126 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC); - -#line default -#line hidden - WriteLiteral("\r\n

"); -#line 127 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_PendingChangesInfoCLI); - -#line default -#line hidden - WriteLiteral("

\r\n "); -#line 128 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_AddMigrationCommandCLI); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n "); -#line 130 "DatabaseErrorPage.cshtml" - Write(Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI); - -#line default -#line hidden - WriteLiteral("\r\n
\r\n
\r\n"); -#line 133 "DatabaseErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral("\r\n"); - } - #pragma warning restore 1998 - } -} diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cshtml b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cshtml deleted file mode 100644 index c790b461eb..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPage.cshtml +++ /dev/null @@ -1,135 +0,0 @@ -@using System -@using System.Linq -@using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore -@using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views -@{ - Response.StatusCode = 500; - Response.ContentType = "text/html"; - Response.ContentLength = null; // Clear any prior Content-Length -} -@functions -{ - public DatabaseErrorPageModel Model { get; set; } - - public string UrlEncode(string content) - { - return UrlEncoder.Encode(content); - } - - public string JavaScriptEncode(string content) - { - return JavaScriptEncoder.Encode(content); - } -} - - - - - - Internal Server Error - - - -

@Strings.DatabaseErrorPage_Title

-

- @for (Exception ex = Model.Exception; ex != null; ex = ex.InnerException) - { - @ex.GetType().Name: @ex.Message -
- } -

-
- - @if (!Model.DatabaseExists && !Model.PendingMigrations.Any()) - { -

@Strings.FormatDatabaseErrorPage_NoDbOrMigrationsTitle(Model.ContextType.Name)

-

@Strings.DatabaseErrorPage_NoDbOrMigrationsInfoPMC

- @Strings.DatabaseErrorPage_AddMigrationCommandPMC -
- @Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC -

@Strings.DatabaseErrorPage_NoDbOrMigrationsInfoCLI

- @Strings.DatabaseErrorPage_AddMigrationCommandCLI -
- @Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI -
- } - else if (Model.PendingMigrations.Any()) - { -
-

@Strings.FormatDatabaseErrorPage_PendingMigrationsTitle(Model.ContextType.Name)

-

@Strings.FormatDatabaseErrorPage_PendingMigrationsInfo(Model.ContextType.Name)

- - - -

- - - -

- - -

@Strings.DatabaseErrorPage_HowToApplyFromPMC

- @Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC -

@Strings.DatabaseErrorPage_HowToApplyFromCLI

- @Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI -
-
- } - else if (Model.PendingModelChanges) - { -
-

@Strings.FormatDatabaseErrorPage_PendingChangesTitle(Model.ContextType.Name)

-

@Strings.DatabaseErrorPage_PendingChangesInfoPMC

- @Strings.DatabaseErrorPage_AddMigrationCommandPMC -
- @Strings.DatabaseErrorPage_ApplyMigrationsCommandPMC -

@Strings.DatabaseErrorPage_PendingChangesInfoCLI

- @Strings.DatabaseErrorPage_AddMigrationCommandCLI -
- @Strings.DatabaseErrorPage_ApplyMigrationsCommandCLI -
-
- } - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPageModel.cs b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPageModel.cs deleted file mode 100644 index 15c7ad66c9..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/Views/Obsolete/DatabaseErrorPageModel.cs +++ /dev/null @@ -1,73 +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. - -using JetBrains.Annotations; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Utilities; -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views -{ - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class DatabaseErrorPageModel - { - private readonly Type _contextType; - private readonly Exception _exception; - private readonly bool _databaseExists; - private readonly bool _pendingModelChanges; - private readonly IEnumerable _pendingMigrations; - private readonly DatabaseErrorPageOptions _options; - - public DatabaseErrorPageModel( - [NotNull] Type contextType, - [NotNull] Exception exception, - bool databaseExists, - bool pendingModelChanges, - [NotNull] IEnumerable pendingMigrations, - [NotNull] DatabaseErrorPageOptions options) - { - Check.NotNull(contextType, "contextType"); - Check.NotNull(exception, "exception"); - Check.NotNull(pendingMigrations, "pendingMigrations"); - Check.NotNull(options, "options"); - - _contextType = contextType; - _exception = exception; - _databaseExists = databaseExists; - _pendingModelChanges = pendingModelChanges; - _pendingMigrations = pendingMigrations; - _options = options; - } - - public virtual Type ContextType - { - get { return _contextType; } - } - - public virtual Exception Exception - { - get { return _exception; } - } - - public virtual bool DatabaseExists - { - get { return _databaseExists; } - } - - public virtual bool PendingModelChanges - { - get { return _pendingModelChanges; } - } - - public virtual IEnumerable PendingMigrations - { - get { return _pendingMigrations; } - } - - public virtual DatabaseErrorPageOptions Options - { - get { return _options; } - } - } -} diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.net45.json b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.net45.json new file mode 100644 index 0000000000..df638364aa --- /dev/null +++ b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.net45.json @@ -0,0 +1,10 @@ +[ + { + "OldTypeId": "public class Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views.DatabaseErrorPage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView", + "Kind": "Removal" + }, + { + "OldTypeId": "public class Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views.DatabaseErrorPageModel", + "Kind": "Removal" + } +] \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.netcore.json b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.netcore.json new file mode 100644 index 0000000000..df638364aa --- /dev/null +++ b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/exceptions.netcore.json @@ -0,0 +1,10 @@ +[ + { + "OldTypeId": "public class Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views.DatabaseErrorPage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView", + "Kind": "Removal" + }, + { + "OldTypeId": "public class Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views.DatabaseErrorPageModel", + "Kind": "Removal" + } +] \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorModel.cs b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorModel.cs deleted file mode 100644 index c0345d3d86..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorModel.cs +++ /dev/null @@ -1,26 +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. - -using System; -using System.Collections.Generic; -using Microsoft.AspNetCore.Builder; - -namespace Microsoft.AspNetCore.Diagnostics.Views -{ - /// - /// Holds data to be displayed on the compilation error page. - /// - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class CompilationErrorPageModel - { - /// - /// Options for what output to display. - /// - public DeveloperExceptionPageOptions Options { get; set; } - - /// - /// Detailed information about each parse or compilation error. - /// - public IList ErrorDetails { get; } = new List(); - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cs b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cs deleted file mode 100644 index d3796d54b1..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cs +++ /dev/null @@ -1,404 +0,0 @@ -namespace Microsoft.AspNetCore.Diagnostics.Views -{ -#line 1 "CompilationErrorPage.cshtml" -using System - -#line default -#line hidden - ; -#line 2 "CompilationErrorPage.cshtml" -using System.Globalization - -#line default -#line hidden - ; -#line 3 "CompilationErrorPage.cshtml" -using System.Linq - -#line default -#line hidden - ; -#line 4 "CompilationErrorPage.cshtml" -using System.Net - -#line default -#line hidden - ; -#line 5 "CompilationErrorPage.cshtml" -using Microsoft.AspNetCore.Diagnostics - -#line default -#line hidden - ; - using System.Threading.Tasks; - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class CompilationErrorPage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView - { -#line 7 "CompilationErrorPage.cshtml" - - public CompilationErrorPageModel Model { get; set; } - -#line default -#line hidden - #line hidden - public CompilationErrorPage() - { - } - - #pragma warning disable 1998 - public override async Task ExecuteAsync() - { -#line 10 "CompilationErrorPage.cshtml" - - Response.StatusCode = 500; - Response.ContentType = "text/html; charset=utf-8"; - Response.ContentLength = null; // Clear any prior Content-Length - -#line default -#line hidden - - WriteLiteral("\r\n\r\n \r\n \r\n "); -#line 19 "CompilationErrorPage.cshtml" - Write(Resources.ErrorPageHtml_Title); - -#line default -#line hidden - WriteLiteral("\r\n \r\n \r\n \r\n

"); -#line 25 "CompilationErrorPage.cshtml" - Write(Resources.ErrorPageHtml_CompilationException); - -#line default -#line hidden - WriteLiteral("

\r\n"); -#line 26 "CompilationErrorPage.cshtml" - - -#line default -#line hidden - -#line 26 "CompilationErrorPage.cshtml" - foreach (var errorDetail in Model.ErrorDetails) - { - -#line default -#line hidden - - WriteLiteral("
\r\n"); -#line 29 "CompilationErrorPage.cshtml" - - -#line default -#line hidden - -#line 29 "CompilationErrorPage.cshtml" - - var stackFrameCount = 0; - var frameId = ""; - - -#line default -#line hidden - - WriteLiteral(" "); -#line 33 "CompilationErrorPage.cshtml" - - var fileName = errorDetail.StackFrames.FirstOrDefault()?.File; - if (!string.IsNullOrEmpty(fileName)) - { - -#line default -#line hidden - - WriteLiteral("
"); -#line 37 "CompilationErrorPage.cshtml" - Write(fileName); - -#line default -#line hidden - WriteLiteral("
\r\n"); -#line 38 "CompilationErrorPage.cshtml" - } - - -#line default -#line hidden - - WriteLiteral(" "); -#line 40 "CompilationErrorPage.cshtml" - if (!string.IsNullOrEmpty(errorDetail.ErrorMessage)) - { - -#line default -#line hidden - - WriteLiteral("
"); -#line 42 "CompilationErrorPage.cshtml" - Write(errorDetail.ErrorMessage); - -#line default -#line hidden - WriteLiteral("
\r\n"); -#line 43 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral("
\r\n
    \r\n"); -#line 46 "CompilationErrorPage.cshtml" - - -#line default -#line hidden - -#line 46 "CompilationErrorPage.cshtml" - foreach (var frame in errorDetail.StackFrames) - { - - -#line default -#line hidden - -#line 48 "CompilationErrorPage.cshtml" - - stackFrameCount++; - frameId = "frame" + stackFrameCount; - - -#line default -#line hidden - -#line 51 "CompilationErrorPage.cshtml" - - -#line default -#line hidden - - WriteLiteral("
  • "); -#line 67 "CompilationErrorPage.cshtml" - Write(line); - -#line default -#line hidden - WriteLiteral("
  • \r\n"); -#line 68 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral(" \r\n"); -#line 70 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral("
\r\n"); -#line 87 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral(" \r\n"); -#line 89 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral(" \r\n
\r\n \r\n"); -#line 93 "CompilationErrorPage.cshtml" - } - -#line default -#line hidden - - WriteLiteral(" \r\n \r\n\r\n"); - } - #pragma warning restore 1998 - } -} diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cshtml b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cshtml deleted file mode 100644 index 932d677b9c..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/CompilationErrorPage.cshtml +++ /dev/null @@ -1,100 +0,0 @@ -@using System -@using System.Globalization -@using System.Linq -@using System.Net -@using Microsoft.AspNetCore.Diagnostics -@functions -{ - public CompilationErrorPageModel Model { get; set; } -} -@{ - Response.StatusCode = 500; - Response.ContentType = "text/html; charset=utf-8"; - Response.ContentLength = null; // Clear any prior Content-Length -} - - - - - @Resources.ErrorPageHtml_Title - - - -

@Resources.ErrorPageHtml_CompilationException

- @foreach (var errorDetail in Model.ErrorDetails) - { -
- @{ - var stackFrameCount = 0; - var frameId = ""; - } - @{ - var fileName = errorDetail.StackFrames.FirstOrDefault()?.File; - if (!string.IsNullOrEmpty(fileName)) - { -
@fileName
- } - } - @if (!string.IsNullOrEmpty(errorDetail.ErrorMessage)) - { -
@errorDetail.ErrorMessage
- } -
-
    - @foreach (var frame in errorDetail.StackFrames) - { - @{ - stackFrameCount++; - frameId = "frame" + stackFrameCount; - } -
  • - @if (!string.IsNullOrEmpty(frame.ErrorDetails)) - { -

    @frame.ErrorDetails

    - } - - @if (frame.Line != 0 && frame.ContextCode.Any()) - { - -
    - @if (frame.PreContextCode.Any()) - { -
      - @foreach (var line in frame.PreContextCode) - { -
    1. @line
    2. - } -
    - } -
      - @foreach (var line in frame.ContextCode) - { -
    1. @line
    2. - } -
    - @if (frame.PostContextCode.Any()) - { -
      - @foreach (var line in frame.PostContextCode) - { -
    1. @line
    2. - } -
    - } -
    - } -
  • - } -
-
-
- } - - - diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorDetails.cs b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorDetails.cs deleted file mode 100644 index 323c7eabed..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorDetails.cs +++ /dev/null @@ -1,30 +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. - -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNetCore.Diagnostics.Views -{ - /// - /// Contains details for individual exception messages. - /// - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class ErrorDetails - { - /// - /// An individual exception - /// - public Exception Error { get; set; } - - /// - /// The generated stack frames - /// - public IEnumerable StackFrames { get; set; } - - /// - /// Gets or sets the summary message. - /// - public string ErrorMessage { get; set; } - } -} diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.cs b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.cs deleted file mode 100644 index 0ad27f0f85..0000000000 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/Obsolete/ErrorPage.cs +++ /dev/null @@ -1,902 +0,0 @@ -namespace Microsoft.AspNetCore.Diagnostics.Views -{ -#line 1 "ErrorPage.cshtml" -using System - -#line default -#line hidden - ; -#line 2 "ErrorPage.cshtml" -using System.Globalization - -#line default -#line hidden - ; -#line 3 "ErrorPage.cshtml" -using System.Linq - -#line default -#line hidden - ; -#line 4 "ErrorPage.cshtml" -using System.Net - -#line default -#line hidden - ; -#line 5 "ErrorPage.cshtml" -using System.Reflection - -#line default -#line hidden - ; -#line 6 "ErrorPage.cshtml" -using Microsoft.AspNetCore.Diagnostics.Views - -#line default -#line hidden - ; -#line 7 "ErrorPage.cshtml" -using Microsoft.AspNetCore.Diagnostics - -#line default -#line hidden - ; - using System.Threading.Tasks; - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class ErrorPage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView - { -#line 9 "ErrorPage.cshtml" - - public ErrorPage(ErrorPageModel model) - { - Model = model; - } - - public ErrorPageModel Model { get; set; } - -#line default -#line hidden - #line hidden - public ErrorPage() - { - } - - #pragma warning disable 1998 - public override async Task ExecuteAsync() - { -#line 17 "ErrorPage.cshtml" - - // TODO: Response.ReasonPhrase = "Internal Server Error"; - Response.ContentType = "text/html; charset=utf-8"; - string location = string.Empty; - -#line default -#line hidden - - WriteLiteral("\r\n