From 536f6830ba73a0e4ed631fe7dd66ef24128d3c77 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Tue, 7 Oct 2014 09:31:08 -0700 Subject: [PATCH] Fix ILibaryInformation.Version break. --- .../Properties/Resources.Designer.cs | 16 ++ .../Resources.resx | 3 + .../Views/DiagnosticsPage.cs | 47 +--- .../Views/ErrorPage.cs | 221 ++++-------------- .../Views/RuntimeInfoPage.cs | 97 +++----- .../Views/RuntimeInfoPage.cshtml | 2 + .../Views/WelcomePage.cs | 124 ++-------- .../RuntimeInfoMiddlewareTest.cs | 8 +- 8 files changed, 126 insertions(+), 392 deletions(-) diff --git a/src/Microsoft.AspNet.Diagnostics/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Diagnostics/Properties/Resources.Designer.cs index acdb08b710..151b1aa94f 100644 --- a/src/Microsoft.AspNet.Diagnostics/Properties/Resources.Designer.cs +++ b/src/Microsoft.AspNet.Diagnostics/Properties/Resources.Designer.cs @@ -378,6 +378,22 @@ namespace Microsoft.AspNet.Diagnostics return GetString("RuntimeInfoPage_PackagesFail"); } + /// + /// Name + /// + internal static string RuntimeInfoPage_PackageVersionColumnName + { + get { return GetString("RuntimeInfoPage_PackageVersionColumnName"); } + } + + /// + /// Name + /// + internal static string FormatRuntimeInfoPage_PackageVersionColumnName() + { + return GetString("RuntimeInfoPage_PackageVersionColumnName"); + } + /// /// Runtime Version: /// diff --git a/src/Microsoft.AspNet.Diagnostics/Resources.resx b/src/Microsoft.AspNet.Diagnostics/Resources.resx index 4eb16cc19c..a56b82ed1d 100644 --- a/src/Microsoft.AspNet.Diagnostics/Resources.resx +++ b/src/Microsoft.AspNet.Diagnostics/Resources.resx @@ -194,6 +194,9 @@ Could not retrieve the list of loaded packages. + + Version + Runtime Version: diff --git a/src/Microsoft.AspNet.Diagnostics/Views/DiagnosticsPage.cs b/src/Microsoft.AspNet.Diagnostics/Views/DiagnosticsPage.cs index 85c21de952..a96bc09294 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/DiagnosticsPage.cs +++ b/src/Microsoft.AspNet.Diagnostics/Views/DiagnosticsPage.cs @@ -1,6 +1,3 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - namespace Microsoft.AspNet.Diagnostics.Views { #line 1 "DiagnosticsPage.cshtml" @@ -41,64 +38,34 @@ using System.Globalization WriteLiteral("\r\n\r\n\r\n\r\n\r\n \r\n "); - Write( #line 16 "DiagnosticsPage.cshtml" - Resources.DiagnosticsPageHtml_Title + Write(Resources.DiagnosticsPageHtml_Title); #line default #line hidden - ); - WriteLiteral("\r\n\r\n\r\n
\r\n

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

\r\n

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

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

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

\r\n

( -#line 25 "DiagnosticsPage.cshtml" - Request.PathBase - -#line default -#line hidden - , 774), false), - Tuple.Create(Tuple.Create("", 791), Tuple.Create( -#line 25 "DiagnosticsPage.cshtml" - Request.Path - -#line default -#line hidden - , 791), false), Tuple.Create(Tuple.Create("", 804), Tuple.Create("?error=", 804), true), - Tuple.Create(Tuple.Create("", 811), Tuple.Create( -#line 25 "DiagnosticsPage.cshtml" - Resources.DiagnosticsPageHtml_TestErrorMessage - -#line default -#line hidden - , 811), false)); + Tuple.Create(Tuple.Create("", 774), Tuple.Create(Request.PathBase, 774), false), + Tuple.Create(Tuple.Create("", 791), Tuple.Create(Request.Path, 791), false), Tuple.Create(Tuple.Create("", 804), Tuple.Create("?error=", 804), true), + Tuple.Create(Tuple.Create("", 811), Tuple.Create(Resources.DiagnosticsPageHtml_TestErrorMessage, 811), false)); WriteLiteral(">throw InvalidOperationException

\r\n
\r\n\r\n\r\n"); } #pragma warning restore 1998 diff --git a/src/Microsoft.AspNet.Diagnostics/Views/ErrorPage.cs b/src/Microsoft.AspNet.Diagnostics/Views/ErrorPage.cs index e07c402da0..3dcfb1eb99 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/ErrorPage.cs +++ b/src/Microsoft.AspNet.Diagnostics/Views/ErrorPage.cs @@ -60,33 +60,21 @@ using Views WriteLiteral("\r\n\r\n( -#line 22 "ErrorPage.cshtml" - CultureInfo.CurrentUICulture.TwoLetterISOLanguageName - -#line default -#line hidden - , 506), false)); + Tuple.Create(Tuple.Create("", 506), Tuple.Create(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 506), false)); WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n \r\n \r\n "); - Write( #line 25 "ErrorPage.cshtml" - Resources.ErrorPageHtml_Title + Write(Resources.ErrorPageHtml_Title); #line default #line hidden - ); - WriteLiteral("\r\n \r" + "\n\r\n\r\n

"); - Write( #line 27 "RuntimeInfoPage.cshtml" - Resources.RuntimeInfoPage_RuntimeVersion + Write(Resources.RuntimeInfoPage_RuntimeVersion); #line default #line hidden - ); - WriteLiteral("

\r\n

"); - Write( #line 28 "RuntimeInfoPage.cshtml" - string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version + Write(string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version); #line default #line hidden - ); - WriteLiteral("

\r\n \r\n

"); - Write( #line 30 "RuntimeInfoPage.cshtml" - Resources.RuntimeInfoPage_Packages + Write(Resources.RuntimeInfoPage_Packages); #line default #line hidden - ); - WriteLiteral("

\r\n"); #line 31 "RuntimeInfoPage.cshtml" @@ -121,14 +103,11 @@ using Microsoft.Framework.Runtime; #line hidden WriteLiteral("

"); - Write( #line 33 "RuntimeInfoPage.cshtml" - Resources.RuntimeInfoPage_PackagesFail + Write(Resources.RuntimeInfoPage_PackagesFail); #line default #line hidden - ); - WriteLiteral("

\r\n"); #line 34 "RuntimeInfoPage.cshtml" } @@ -140,44 +119,44 @@ using Microsoft.Framework.Runtime; WriteLiteral(" \r\n \r\n \r\n <" + "th>"); - Write( #line 40 "RuntimeInfoPage.cshtml" - Resources.RuntimeInfoPage_PackageNameColumnName + Write(Resources.RuntimeInfoPage_PackageNameColumnName); #line default #line hidden - ); - WriteLiteral("\r\n \r\n \r\n \r\n \r\n \r\n"); -#line 45 "RuntimeInfoPage.cshtml" +#line 46 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 45 "RuntimeInfoPage.cshtml" +#line 46 "RuntimeInfoPage.cshtml" bool even = false; #line default #line hidden WriteLiteral("\r\n"); -#line 46 "RuntimeInfoPage.cshtml" +#line 47 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 46 "RuntimeInfoPage.cshtml" +#line 47 "RuntimeInfoPage.cshtml" foreach (var package in Model.References.OrderBy(package => package.Name.ToLowerInvariant())) { @@ -185,46 +164,40 @@ using Microsoft.Framework.Runtime; #line hidden WriteLiteral(" ( -#line 48 "RuntimeInfoPage.cshtml" - even?"even":"odd" - -#line default -#line hidden - , 1502), false)); + WriteAttribute("class", Tuple.Create(" class=\"", 1576), Tuple.Create("\"", 1604), + Tuple.Create(Tuple.Create("", 1584), Tuple.Create(even?"even":"odd", 1584), false)); WriteLiteral(">\r\n \r\n \r\n \r\n \r\n"); +#line default +#line hidden + WriteLiteral("\r\n \r\n \r\n"); +#line 54 "RuntimeInfoPage.cshtml" #line default #line hidden -#line 52 "RuntimeInfoPage.cshtml" +#line 54 "RuntimeInfoPage.cshtml" even = !even; #line default #line hidden -#line 52 "RuntimeInfoPage.cshtml" +#line 54 "RuntimeInfoPage.cshtml" } @@ -232,7 +205,7 @@ using Microsoft.Framework.Runtime; #line hidden WriteLiteral(" \r\n
"); - Write( #line 41 "RuntimeInfoPage.cshtml" - Resources.RuntimeInfoPage_PackagePathColumnName + Write(Resources.RuntimeInfoPage_PackageVersionColumnName); #line default #line hidden - ); + WriteLiteral(""); +#line 42 "RuntimeInfoPage.cshtml" + Write(Resources.RuntimeInfoPage_PackagePathColumnName); +#line default +#line hidden WriteLiteral("
"); - Write( -#line 49 "RuntimeInfoPage.cshtml" - package.Name - -#line default -#line hidden - ); - - WriteLiteral(""); - Write( #line 50 "RuntimeInfoPage.cshtml" - package.Path + Write(package.Name); #line default #line hidden - ); + WriteLiteral(""); +#line 51 "RuntimeInfoPage.cshtml" + Write(package.Version); - WriteLiteral("
"); #line 52 "RuntimeInfoPage.cshtml" + Write(package.Path); + +#line default +#line hidden + WriteLiteral("
\r\n"); -#line 56 "RuntimeInfoPage.cshtml" +#line 58 "RuntimeInfoPage.cshtml" } #line default diff --git a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml index 335a572f45..5736c9e9fd 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml +++ b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPage.cshtml @@ -38,6 +38,7 @@ @Resources.RuntimeInfoPage_PackageNameColumnName + @Resources.RuntimeInfoPage_PackageVersionColumnName @Resources.RuntimeInfoPage_PackagePathColumnName @@ -47,6 +48,7 @@ { @package.Name + @package.Version @package.Path @{ even = !even; } diff --git a/src/Microsoft.AspNet.Diagnostics/Views/WelcomePage.cs b/src/Microsoft.AspNet.Diagnostics/Views/WelcomePage.cs index 4820d022d6..3e81e14013 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/WelcomePage.cs +++ b/src/Microsoft.AspNet.Diagnostics/Views/WelcomePage.cs @@ -27,22 +27,13 @@ using System WriteLiteral("\r\n\r\n( -#line 6 "WelcomePage.cshtml" - System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName - -#line default -#line hidden - , 92), false)); + Tuple.Create(Tuple.Create("", 92), Tuple.Create(System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 92), false)); WriteLiteral(">\r\n\r\n \r\n "); - Write( #line 9 "WelcomePage.cshtml" - Resources.WelcomeTitle + Write(Resources.WelcomeTitle); #line default #line hidden - ); - WriteLiteral("\r\n