Runtime information page
This commit is contained in:
parent
14bca1d49b
commit
0c3f7eab9e
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.22013.1
|
||||
VisualStudioVersion = 14.0.22130.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{509A6F36-AD80-4A18-B5B1-717D38DFF29D}"
|
||||
EndProject
|
||||
|
|
@ -20,6 +20,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
global.json = global.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeInfoPageSample", "samples\RuntimeInfoPageSample\RuntimeInfoPageSample.kproj", "{CD62A191-39F5-4C86-BC1D-7731085120F5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2AF90579-B118-4583-AE88-672EFACB5BC4}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Diagnostics.Tests", "test\Microsoft.AspNet.Diagnostics.Tests\Microsoft.AspNet.Diagnostics.Tests.kproj", "{994351B4-7B2A-4139-8B72-72C5BB5CC618}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -70,6 +76,26 @@ Global
|
|||
{4D4A785A-ECB9-4916-A88F-0FD306EE3B74}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{4D4A785A-ECB9-4916-A88F-0FD306EE3B74}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{4D4A785A-ECB9-4916-A88F-0FD306EE3B74}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -79,5 +105,7 @@ Global
|
|||
{68A1F0E1-ECCE-46D1-B20F-C43EE5B097DE} = {509A6F36-AD80-4A18-B5B1-717D38DFF29D}
|
||||
{589AC17F-9455-4764-8F82-FCD2AE58DA14} = {ACAA0157-A8C4-4152-93DE-90CCDF304087}
|
||||
{4D4A785A-ECB9-4916-A88F-0FD306EE3B74} = {509A6F36-AD80-4A18-B5B1-717D38DFF29D}
|
||||
{CD62A191-39F5-4C86-BC1D-7731085120F5} = {ACAA0157-A8C4-4152-93DE-90CCDF304087}
|
||||
{994351B4-7B2A-4139-8B72-72C5BB5CC618} = {2AF90579-B118-4583-AE88-672EFACB5BC4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>cd62a191-39f5-4c86-bc1d-7731085120f5</ProjectGuid>
|
||||
<OutputType>Web</OutputType>
|
||||
<RootNamespace>RuntimeInfoPageSample</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>44048</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Diagnostics;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
||||
namespace RuntimeInfoPageSample
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseRuntimeInfoPage();
|
||||
|
||||
app.Run(context =>
|
||||
{
|
||||
context.Response.StatusCode = 302;
|
||||
context.Response.Headers["Location"] = "/runtimeinfo";
|
||||
|
||||
return Task.FromResult(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"webroot" : "wwwroot",
|
||||
"exclude": "wwwroot/**/*.*",
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Diagnostics": "",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-*"
|
||||
},
|
||||
"frameworks" : {
|
||||
"aspnet50" : { },
|
||||
"aspnetcore50" : { }
|
||||
}
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
model.Environment = context;
|
||||
}*/
|
||||
|
||||
var errorPage = new ErrorPage() { Model = model };
|
||||
var errorPage = new ErrorPage(model);
|
||||
await errorPage.ExecuteAsync(context);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
internal sealed class NotNullAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// 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.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Microsoft.AspNet.Diagnostics.Tests")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
||||
|
|
@ -0,0 +1,574 @@
|
|||
// <auto-generated />
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
|
||||
internal static class Resources
|
||||
{
|
||||
private static readonly ResourceManager _resourceManager
|
||||
= new ResourceManager("Microsoft.AspNet.Diagnostics.Resources", typeof(Resources).GetTypeInfo().Assembly);
|
||||
|
||||
/// <summary>
|
||||
/// You are seeing this page because DiagnosticsPageMiddleware was added to your web application.
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_Information
|
||||
{
|
||||
get { return GetString("DiagnosticsPageHtml_Information"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// You are seeing this page because DiagnosticsPageMiddleware was added to your web application.
|
||||
/// </summary>
|
||||
internal static string FormatDiagnosticsPageHtml_Information()
|
||||
{
|
||||
return GetString("DiagnosticsPageHtml_Information");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Error Message
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_TestErrorMessage
|
||||
{
|
||||
get { return GetString("DiagnosticsPageHtml_TestErrorMessage"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Error Message
|
||||
/// </summary>
|
||||
internal static string FormatDiagnosticsPageHtml_TestErrorMessage()
|
||||
{
|
||||
return GetString("DiagnosticsPageHtml_TestErrorMessage");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Error Page
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_TestErrorSection
|
||||
{
|
||||
get { return GetString("DiagnosticsPageHtml_TestErrorSection"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Error Page
|
||||
/// </summary>
|
||||
internal static string FormatDiagnosticsPageHtml_TestErrorSection()
|
||||
{
|
||||
return GetString("DiagnosticsPageHtml_TestErrorSection");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Diagnostics Page
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_Title
|
||||
{
|
||||
get { return GetString("DiagnosticsPageHtml_Title"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Diagnostics Page
|
||||
/// </summary>
|
||||
internal static string FormatDiagnosticsPageHtml_Title()
|
||||
{
|
||||
return GetString("DiagnosticsPageHtml_Title");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cookies
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_CookiesButton
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_CookiesButton"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cookies
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_CookiesButton()
|
||||
{
|
||||
return GetString("ErrorPageHtml_CookiesButton");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable development mode or ErrorPageOptions.ShowExceptionDetails for additional information.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_EnableShowExceptions
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_EnableShowExceptions"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable development mode or ErrorPageOptions.ShowExceptionDetails for additional information.
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_EnableShowExceptions()
|
||||
{
|
||||
return GetString("ErrorPageHtml_EnableShowExceptions");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Environment
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_EnvironmentButton
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_EnvironmentButton"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Environment
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_EnvironmentButton()
|
||||
{
|
||||
return GetString("ErrorPageHtml_EnvironmentButton");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Headers
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_HeadersButton
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_HeadersButton"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Headers
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_HeadersButton()
|
||||
{
|
||||
return GetString("ErrorPageHtml_HeadersButton");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No cookie data.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoCookieData
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_NoCookieData"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No cookie data.
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_NoCookieData()
|
||||
{
|
||||
return GetString("ErrorPageHtml_NoCookieData");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No header data.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoHeaderData
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_NoHeaderData"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No header data.
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_NoHeaderData()
|
||||
{
|
||||
return GetString("ErrorPageHtml_NoHeaderData");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No QueryString data.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoQueryStringData
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_NoQueryStringData"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No QueryString data.
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_NoQueryStringData()
|
||||
{
|
||||
return GetString("ErrorPageHtml_NoQueryStringData");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Query
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_QueryButton
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_QueryButton"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Query
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_QueryButton()
|
||||
{
|
||||
return GetString("ErrorPageHtml_QueryButton");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stack
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_StackButton
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_StackButton"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stack
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_StackButton()
|
||||
{
|
||||
return GetString("ErrorPageHtml_StackButton");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal Server Error
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_Title
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_Title"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal Server Error
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_Title()
|
||||
{
|
||||
return GetString("ErrorPageHtml_Title");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An unhandled exception occurred while processing the request.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_UnhandledException
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_UnhandledException"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An unhandled exception occurred while processing the request.
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_UnhandledException()
|
||||
{
|
||||
return GetString("ErrorPageHtml_UnhandledException");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unknown location
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_UnknownLocation
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_UnknownLocation"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unknown location
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_UnknownLocation()
|
||||
{
|
||||
return GetString("ErrorPageHtml_UnknownLocation");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_ValueColumn
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_ValueColumn"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_ValueColumn()
|
||||
{
|
||||
return GetString("ErrorPageHtml_ValueColumn");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Variable
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_VariableColumn
|
||||
{
|
||||
get { return GetString("ErrorPageHtml_VariableColumn"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Variable
|
||||
/// </summary>
|
||||
internal static string FormatErrorPageHtml_VariableColumn()
|
||||
{
|
||||
return GetString("ErrorPageHtml_VariableColumn");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The path must start with a '/'.
|
||||
/// </summary>
|
||||
internal static string Exception_PathMustStartWithSlash
|
||||
{
|
||||
get { return GetString("Exception_PathMustStartWithSlash"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The path must start with a '/'.
|
||||
/// </summary>
|
||||
internal static string FormatException_PathMustStartWithSlash()
|
||||
{
|
||||
return GetString("Exception_PathMustStartWithSlash");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_PackageNameColumnName
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_PackageNameColumnName"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_PackageNameColumnName()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_PackageNameColumnName");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_PackagePathColumnName
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_PackagePathColumnName"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_PackagePathColumnName()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_PackagePathColumnName");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Packages:
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_Packages
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_Packages"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Packages:
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_Packages()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_Packages");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Could not retrieve the list of loaded packages.
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_PackagesFail
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_PackagesFail"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Could not retrieve the list of loaded packages.
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_PackagesFail()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_PackagesFail");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runtime Version:
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_RuntimeVersion
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_RuntimeVersion"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runtime Version:
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_RuntimeVersion()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_RuntimeVersion");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Could not determine the runtime version.
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_RuntimeVersionFail
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_RuntimeVersionFail"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Could not determine the runtime version.
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_RuntimeVersionFail()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_RuntimeVersionFail");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runtime Information
|
||||
/// </summary>
|
||||
internal static string RuntimeInfoPage_Title
|
||||
{
|
||||
get { return GetString("RuntimeInfoPage_Title"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runtime Information
|
||||
/// </summary>
|
||||
internal static string FormatRuntimeInfoPage_Title()
|
||||
{
|
||||
return GetString("RuntimeInfoPage_Title");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Welcome
|
||||
/// </summary>
|
||||
internal static string WelcomeHeader
|
||||
{
|
||||
get { return GetString("WelcomeHeader"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Welcome
|
||||
/// </summary>
|
||||
internal static string FormatWelcomeHeader()
|
||||
{
|
||||
return GetString("WelcomeHeader");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Learn more about the Microsoft ASP.NET vNext components
|
||||
/// </summary>
|
||||
internal static string WelcomeLearnMicrosoftAspNet
|
||||
{
|
||||
get { return GetString("WelcomeLearnMicrosoftAspNet"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Learn more about the Microsoft ASP.NET vNext components
|
||||
/// </summary>
|
||||
internal static string FormatWelcomeLearnMicrosoftAspNet()
|
||||
{
|
||||
return GetString("WelcomeLearnMicrosoftAspNet");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Browser
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_Browser
|
||||
{
|
||||
get { return GetString("WelcomePageImageText_Browser"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Browser
|
||||
/// </summary>
|
||||
internal static string FormatWelcomePageImageText_Browser()
|
||||
{
|
||||
return GetString("WelcomePageImageText_Browser");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Learn More
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_LearnMore
|
||||
{
|
||||
get { return GetString("WelcomePageImageText_LearnMore"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Learn More
|
||||
/// </summary>
|
||||
internal static string FormatWelcomePageImageText_LearnMore()
|
||||
{
|
||||
return GetString("WelcomePageImageText_LearnMore");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Light Bulb
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_LightBulb
|
||||
{
|
||||
get { return GetString("WelcomePageImageText_LightBulb"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Light Bulb
|
||||
/// </summary>
|
||||
internal static string FormatWelcomePageImageText_LightBulb()
|
||||
{
|
||||
return GetString("WelcomePageImageText_LightBulb");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skyline
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_Skyline
|
||||
{
|
||||
get { return GetString("WelcomePageImageText_Skyline"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skyline
|
||||
/// </summary>
|
||||
internal static string FormatWelcomePageImageText_Skyline()
|
||||
{
|
||||
return GetString("WelcomePageImageText_Skyline");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Your ASP.NET vNext application has been successfully started
|
||||
/// </summary>
|
||||
internal static string WelcomeStarted
|
||||
{
|
||||
get { return GetString("WelcomeStarted"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Your ASP.NET vNext application has been successfully started
|
||||
/// </summary>
|
||||
internal static string FormatWelcomeStarted()
|
||||
{
|
||||
return GetString("WelcomeStarted");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Your ASP.NET vNext application has been successfully started.
|
||||
/// </summary>
|
||||
internal static string WelcomeTitle
|
||||
{
|
||||
get { return GetString("WelcomeTitle"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Your ASP.NET vNext application has been successfully started.
|
||||
/// </summary>
|
||||
internal static string FormatWelcomeTitle()
|
||||
{
|
||||
return GetString("WelcomeTitle");
|
||||
}
|
||||
|
||||
private static string GetString(string name, params string[] formatterNames)
|
||||
{
|
||||
var value = _resourceManager.GetString(name);
|
||||
|
||||
System.Diagnostics.Debug.Assert(value != null);
|
||||
|
||||
if (formatterNames != null)
|
||||
{
|
||||
for (var i = 0; i < formatterNames.Length; i++)
|
||||
{
|
||||
value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,306 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.33440
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNet.Diagnostics.Resources", System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Resources)).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are seeing this page because DiagnosticsPageMiddleware was added to your web application..
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_Information {
|
||||
get {
|
||||
return ResourceManager.GetString("DiagnosticsPageHtml_Information", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test Error Message.
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_TestErrorMessage {
|
||||
get {
|
||||
return ResourceManager.GetString("DiagnosticsPageHtml_TestErrorMessage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test Error Page.
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_TestErrorSection {
|
||||
get {
|
||||
return ResourceManager.GetString("DiagnosticsPageHtml_TestErrorSection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Diagnostics Page.
|
||||
/// </summary>
|
||||
internal static string DiagnosticsPageHtml_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("DiagnosticsPageHtml_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cookies.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_CookiesButton {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_CookiesButton", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enable development mode or ErrorPageOptions.ShowExceptionDetails for additional information..
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_EnableShowExceptions {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_EnableShowExceptions", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Environment.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_EnvironmentButton {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_EnvironmentButton", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Headers.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_HeadersButton {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_HeadersButton", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No cookie data..
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoCookieData {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_NoCookieData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No header data..
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoHeaderData {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_NoHeaderData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No QueryString data..
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_NoQueryStringData {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_NoQueryStringData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Query.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_QueryButton {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_QueryButton", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stack.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_StackButton {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_StackButton", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Internal Server Error.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An unhandled exception occurred while processing the request..
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_UnhandledException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_UnhandledException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unknown location.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_UnknownLocation {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_UnknownLocation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Value.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_ValueColumn {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_ValueColumn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Variable.
|
||||
/// </summary>
|
||||
internal static string ErrorPageHtml_VariableColumn {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorPageHtml_VariableColumn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The path must start with a '/'..
|
||||
/// </summary>
|
||||
internal static string Exception_PathMustStartWithSlash {
|
||||
get {
|
||||
return ResourceManager.GetString("Exception_PathMustStartWithSlash", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Welcome.
|
||||
/// </summary>
|
||||
internal static string WelcomeHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomeHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Learn more about the Microsoft ASP.NET vNext components.
|
||||
/// </summary>
|
||||
internal static string WelcomeLearnMicrosoftAspNet {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomeLearnMicrosoftAspNet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browser.
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_Browser {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomePageImageText_Browser", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Learn More.
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_LearnMore {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomePageImageText_LearnMore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Light Bulb.
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_LightBulb {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomePageImageText_LightBulb", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Skyline.
|
||||
/// </summary>
|
||||
internal static string WelcomePageImageText_Skyline {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomePageImageText_Skyline", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your ASP.NET vNext application has been successfully started.
|
||||
/// </summary>
|
||||
internal static string WelcomeStarted {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomeStarted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your ASP.NET vNext application has been successfully started..
|
||||
/// </summary>
|
||||
internal static string WelcomeTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("WelcomeTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -182,6 +182,27 @@
|
|||
<data name="Exception_PathMustStartWithSlash" xml:space="preserve">
|
||||
<value>The path must start with a '/'.</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_PackageNameColumnName" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_PackagePathColumnName" xml:space="preserve">
|
||||
<value>Path</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_Packages" xml:space="preserve">
|
||||
<value>Packages:</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_PackagesFail" xml:space="preserve">
|
||||
<value>Could not retrieve the list of loaded packages.</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_RuntimeVersion" xml:space="preserve">
|
||||
<value>Runtime Version:</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_RuntimeVersionFail" xml:space="preserve">
|
||||
<value>Could not determine the runtime version.</value>
|
||||
</data>
|
||||
<data name="RuntimeInfoPage_Title" xml:space="preserve">
|
||||
<value>Runtime Information</value>
|
||||
</data>
|
||||
<data name="WelcomeHeader" xml:space="preserve">
|
||||
<value>Welcome</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
// 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.
|
||||
|
||||
using Microsoft.AspNet.Diagnostics;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.Framework.Runtime;
|
||||
|
||||
namespace Microsoft.AspNet.Builder
|
||||
{
|
||||
public static class RuntimeInfoExtensions
|
||||
{
|
||||
public static IApplicationBuilder UseRuntimeInfoPage(this IApplicationBuilder builder)
|
||||
{
|
||||
return UseRuntimeInfoPage(builder, new RuntimeInfoPageOptions());
|
||||
}
|
||||
|
||||
public static IApplicationBuilder UseRuntimeInfoPage(this IApplicationBuilder builder, string path)
|
||||
{
|
||||
return UseRuntimeInfoPage(builder, new RuntimeInfoPageOptions() { Path = new PathString(path) });
|
||||
}
|
||||
|
||||
public static IApplicationBuilder UseRuntimeInfoPage(
|
||||
[NotNull] this IApplicationBuilder builder,
|
||||
[NotNull] RuntimeInfoPageOptions options)
|
||||
{
|
||||
var libraryManager = builder.ApplicationServices.GetService(typeof(ILibraryManager)) as ILibraryManager;
|
||||
return builder.Use(next => new RuntimeInfoMiddleware(next, options, libraryManager).Invoke);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Diagnostics.Views;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.Framework.Runtime;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
/// <summary>
|
||||
/// Displays information about the packages used by the application at runtime
|
||||
/// </summary>
|
||||
public class RuntimeInfoMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly RuntimeInfoPageOptions _options;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RuntimeInfoMiddleware"/> class
|
||||
/// </summary>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="options"></param>
|
||||
public RuntimeInfoMiddleware(
|
||||
[NotNull] RequestDelegate next,
|
||||
[NotNull] RuntimeInfoPageOptions options,
|
||||
[NotNull] ILibraryManager libraryManager)
|
||||
{
|
||||
_next = next;
|
||||
_options = options;
|
||||
_libraryManager = libraryManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process an individual request.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
public Task Invoke(HttpContext context)
|
||||
{
|
||||
var request = context.Request;
|
||||
if (!_options.Path.HasValue || _options.Path == request.Path)
|
||||
{
|
||||
var model = CreateRuntimeInfoModel();
|
||||
var runtimeInfoPage = new RuntimeInfoPage(model);
|
||||
return runtimeInfoPage.ExecuteAsync(context);
|
||||
}
|
||||
|
||||
return _next(context);
|
||||
}
|
||||
|
||||
internal RuntimeInfoPageModel CreateRuntimeInfoModel()
|
||||
{
|
||||
var model = new RuntimeInfoPageModel();
|
||||
model.References = _libraryManager.GetLibraries();
|
||||
model.Version = GetRuntimeVersion();
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
private static string GetRuntimeVersion()
|
||||
{
|
||||
var klr = Assembly.Load(new AssemblyName("klr.host"));
|
||||
var version = klr.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||
return version?.InformationalVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// 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.
|
||||
|
||||
using Microsoft.AspNet.Http;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for the RuntimeInfoPage
|
||||
/// </summary>
|
||||
public class RuntimeInfoPageOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RuntimeInfoPageOptions" /> class
|
||||
/// </summary>
|
||||
public RuntimeInfoPageOptions()
|
||||
{
|
||||
Path = new PathString("/runtimeinfo");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies which request path will be responded to. Exact match only. Set to null to handle all requests.
|
||||
/// </summary>
|
||||
public PathString Path { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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 "ErrorPage.cshtml"
|
||||
|
|
@ -33,6 +30,11 @@ using Views
|
|||
{
|
||||
#line 6 "ErrorPage.cshtml"
|
||||
|
||||
public ErrorPage(ErrorPageModel model)
|
||||
{
|
||||
Model = model;
|
||||
}
|
||||
|
||||
public ErrorPageModel Model { get; set; }
|
||||
|
||||
#line default
|
||||
|
|
@ -45,7 +47,7 @@ using Views
|
|||
#pragma warning disable 1998
|
||||
public override async Task ExecuteAsync()
|
||||
{
|
||||
#line 9 "ErrorPage.cshtml"
|
||||
#line 14 "ErrorPage.cshtml"
|
||||
|
||||
Response.StatusCode = 500;
|
||||
// TODO: Response.ReasonPhrase = "Internal Server Error";
|
||||
|
|
@ -57,18 +59,18 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html");
|
||||
WriteAttribute("lang", Tuple.Create(" lang=\"", 415), Tuple.Create("\"", 476),
|
||||
Tuple.Create(Tuple.Create("", 422), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 17 "ErrorPage.cshtml"
|
||||
WriteAttribute("lang", Tuple.Create(" lang=\"", 499), Tuple.Create("\"", 560),
|
||||
Tuple.Create(Tuple.Create("", 506), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 22 "ErrorPage.cshtml"
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 422), false));
|
||||
, 506), false));
|
||||
WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <head>\r\n <meta charset=\"utf-8\"" +
|
||||
" />\r\n <title>");
|
||||
Write(
|
||||
#line 20 "ErrorPage.cshtml"
|
||||
#line 25 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_Title
|
||||
|
||||
#line default
|
||||
|
|
@ -78,7 +80,7 @@ using Views
|
|||
WriteLiteral("</title>\r\n <style>\r\n body {\r\n font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;\r\n font-size: .813em;\r\n line-height: 1.4em;\r\n color: #222;\r\n}\r\n\r\nh1, h2, h3, h4, h5 {\r\n /*font-family: 'Segoe UI',Tahoma,Arial,Helvetica,sans-serif;*/\r\n font-weight: 100;\r\n}\r\n\r\nh1 {\r\n color: #44525e;\r\n margin: 15px 0 15px 0;\r\n}\r\n\r\nh2 {\r\n margin: 10px 5px 0 0;\r\n}\r\n\r\nh3 {\r\n color: #363636;\r\n margin: 5px 5px 0 0;\r\n}\r\n\r\ncode {\r\n font-family: Consolas, \"Courier New\", courier, monospace;\r\n}\r\n\r\nbody .titleerror {\r\n padding: 3px;\r\n}\r\n\r\nbody .location {\r\n margin: 3px 0 10px 30px;\r\n}\r\n\r\n#header {\r\n font-size: 18px;\r\n padding: 15px 0;\r\n border-top: 1px #ddd solid;\r\n border-bottom: 1px #ddd solid;\r\n margin-bottom: 0;\r\n}\r\n\r\n #header li {\r\n display: inline;\r\n margin: 5px;\r\n padding: 5px;\r\n color: #a0a0a0;\r\n cursor: pointer;\r\n }\r\n\r\n #header li:hover {\r\n background: #a9e4f9;\r\n color: #fff;\r\n }\r\n\r\n #header .selected {\r\n background: #44c5f2;\r\n color: #fff;\r\n }\r\n\r\n#stackpage ul {\r\n list-style: none;\r\n padding-left: 0;\r\n margin: 0;\r\n /*border-bottom: 1px #ddd solid;*/\r\n}\r\n\r\n#stackpage .stackerror {\r\n padding: 5px;\r\n border-bottom: 1px #ddd solid;\r\n}\r\n\r\n #stackpage .stackerror:hover {\r\n background-color: #f0f0f0;\r\n }\r\n\r\n#stackpage .frame:hover {\r\n background-color: #f0f0f0;\r\n text-decoration: none;\r\n}\r\n\r\n#stackpage .frame {\r\n padding: 2px;\r\n margin: 0 0 0 30px;\r\n border-bottom: 1px #ddd solid;\r\n cursor: pointer;\r\n}\r\n\r\n #stackpage .frame h3 {\r\n padding: 5px;\r\n margin: 0;\r\n }\r\n\r\n#stackpage .source {\r\n padding: 0;\r\n}\r\n\r\n #stackpage .source ol li {\r\n font-family: Consolas, \"Courier New\", courier, monospace;\r\n white-space: pre;\r\n }\r\n\r\n#stackpage .frame:hover .source .highlight li span {\r\n color: #fff;\r\n background: #b20000;\r\n}\r\n\r\n#stackpage .source ol.collapsable li {\r\n color: #888;\r\n}\r\n\r\n #stackpage .source ol.collapsable li span {\r\n color: #606060;\r\n }\r\n\r\n.page table {\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n margin: 0 0 20px;\r\n}\r\n\r\n.page th {\r\n vertical-align: bottom;\r\n padding: 10px 5px 5px 5px;\r\n font-weight: 400;\r\n color: #a0a0a0;\r\n text-align: left;\r\n}\r\n\r\n.page td {\r\n padding: 3px 10px;\r\n}\r\n\r\n.page th, .page td {\r\n border-right: 1px #ddd solid;\r\n border-bottom: 1px #ddd solid;\r\n border-left: 1px transparent solid;\r\n border-top: 1px transparent solid;\r\n box-sizing: border-box;\r\n}\r\n\r\n .page th:last-child, .page td:last-child {\r\n border-right: 1px transparent solid;\r\n }\r\n\r\n .page .length {\r\n text-align: right;\r\n }\r\n\r\na {\r\n color: #1ba1e2;\r\n text-decoration: none;\r\n}\r\n\r\n a:hover {\r\n color: #13709e;\r\n text-decoration: underline;\r\n }\r\n\r\n </s" +
|
||||
"tyle>\r\n </head>\r\n <body>\r\n <h1>");
|
||||
Write(
|
||||
#line 26 "ErrorPage.cshtml"
|
||||
#line 31 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_UnhandledException
|
||||
|
||||
#line default
|
||||
|
|
@ -86,13 +88,13 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</h1>\r\n");
|
||||
#line 27 "ErrorPage.cshtml"
|
||||
#line 32 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "ErrorPage.cshtml"
|
||||
#line 32 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowExceptionDetails)
|
||||
{
|
||||
foreach (var errorDetail in Model.ErrorDetails)
|
||||
|
|
@ -103,7 +105,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <h2 class=\"titleerror\">");
|
||||
Write(
|
||||
#line 31 "ErrorPage.cshtml"
|
||||
#line 36 "ErrorPage.cshtml"
|
||||
errorDetail.Error.GetType().Name
|
||||
|
||||
#line default
|
||||
|
|
@ -112,7 +114,7 @@ using Views
|
|||
|
||||
WriteLiteral(": ");
|
||||
Write(
|
||||
#line 31 "ErrorPage.cshtml"
|
||||
#line 36 "ErrorPage.cshtml"
|
||||
errorDetail.Error.Message
|
||||
|
||||
#line default
|
||||
|
|
@ -120,13 +122,13 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</h2>\r\n");
|
||||
#line 32 "ErrorPage.cshtml"
|
||||
#line 37 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "ErrorPage.cshtml"
|
||||
#line 37 "ErrorPage.cshtml"
|
||||
|
||||
StackFrame firstFrame = null;
|
||||
firstFrame = errorDetail.StackFrames.FirstOrDefault();
|
||||
|
|
@ -143,7 +145,7 @@ using Views
|
|||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "ErrorPage.cshtml"
|
||||
#line 48 "ErrorPage.cshtml"
|
||||
|
||||
if (!string.IsNullOrEmpty(location) && firstFrame != null && !string.IsNullOrEmpty(firstFrame.File))
|
||||
{
|
||||
|
|
@ -153,7 +155,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <p class=\"location\">");
|
||||
Write(
|
||||
#line 46 "ErrorPage.cshtml"
|
||||
#line 51 "ErrorPage.cshtml"
|
||||
location
|
||||
|
||||
#line default
|
||||
|
|
@ -161,17 +163,17 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral(" in <code");
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1871), Tuple.Create("\"", 1895),
|
||||
Tuple.Create(Tuple.Create("", 1879), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 46 "ErrorPage.cshtml"
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1955), Tuple.Create("\"", 1979),
|
||||
Tuple.Create(Tuple.Create("", 1963), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 51 "ErrorPage.cshtml"
|
||||
firstFrame.File
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1879), false));
|
||||
, 1963), false));
|
||||
WriteLiteral(">");
|
||||
Write(
|
||||
#line 46 "ErrorPage.cshtml"
|
||||
#line 51 "ErrorPage.cshtml"
|
||||
System.IO.Path.GetFileName(firstFrame.File)
|
||||
|
||||
#line default
|
||||
|
|
@ -180,7 +182,7 @@ using Views
|
|||
|
||||
WriteLiteral("</code>, line ");
|
||||
Write(
|
||||
#line 46 "ErrorPage.cshtml"
|
||||
#line 51 "ErrorPage.cshtml"
|
||||
firstFrame.Line
|
||||
|
||||
#line default
|
||||
|
|
@ -188,7 +190,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</p>\r\n");
|
||||
#line 47 "ErrorPage.cshtml"
|
||||
#line 52 "ErrorPage.cshtml"
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(location))
|
||||
{
|
||||
|
|
@ -198,7 +200,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <p class=\"location\">");
|
||||
Write(
|
||||
#line 50 "ErrorPage.cshtml"
|
||||
#line 55 "ErrorPage.cshtml"
|
||||
location
|
||||
|
||||
#line default
|
||||
|
|
@ -206,7 +208,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</p>\r\n");
|
||||
#line 51 "ErrorPage.cshtml"
|
||||
#line 56 "ErrorPage.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -216,7 +218,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <p class=\"location\">");
|
||||
Write(
|
||||
#line 54 "ErrorPage.cshtml"
|
||||
#line 59 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_UnknownLocation
|
||||
|
||||
#line default
|
||||
|
|
@ -224,7 +226,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</p>\r\n");
|
||||
#line 55 "ErrorPage.cshtml"
|
||||
#line 60 "ErrorPage.cshtml"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -236,7 +238,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <h2>");
|
||||
Write(
|
||||
#line 60 "ErrorPage.cshtml"
|
||||
#line 65 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_EnableShowExceptions
|
||||
|
||||
#line default
|
||||
|
|
@ -244,20 +246,20 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</h2>\r\n");
|
||||
#line 61 "ErrorPage.cshtml"
|
||||
#line 66 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" <ul id=\"header\">\r\n");
|
||||
#line 63 "ErrorPage.cshtml"
|
||||
#line 68 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "ErrorPage.cshtml"
|
||||
#line 68 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowExceptionDetails)
|
||||
{
|
||||
|
||||
|
|
@ -267,7 +269,7 @@ using Views
|
|||
WriteLiteral(" <li id=\"stack\" tabindex=\"1\" class=\"selected\">\r\n " +
|
||||
" ");
|
||||
Write(
|
||||
#line 66 "ErrorPage.cshtml"
|
||||
#line 71 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_StackButton
|
||||
|
||||
#line default
|
||||
|
|
@ -275,14 +277,14 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("\r\n </li>\r\n");
|
||||
#line 68 "ErrorPage.cshtml"
|
||||
#line 73 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 69 "ErrorPage.cshtml"
|
||||
#line 74 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowQuery)
|
||||
{
|
||||
|
||||
|
|
@ -291,7 +293,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li id=\"query\" tabindex=\"2\">\r\n ");
|
||||
Write(
|
||||
#line 72 "ErrorPage.cshtml"
|
||||
#line 77 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_QueryButton
|
||||
|
||||
#line default
|
||||
|
|
@ -299,14 +301,14 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("\r\n </li>\r\n");
|
||||
#line 74 "ErrorPage.cshtml"
|
||||
#line 79 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 75 "ErrorPage.cshtml"
|
||||
#line 80 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowCookies)
|
||||
{
|
||||
|
||||
|
|
@ -315,7 +317,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li id=\"cookies\" tabindex=\"3\">\r\n ");
|
||||
Write(
|
||||
#line 78 "ErrorPage.cshtml"
|
||||
#line 83 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_CookiesButton
|
||||
|
||||
#line default
|
||||
|
|
@ -323,14 +325,14 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("\r\n </li>\r\n");
|
||||
#line 80 "ErrorPage.cshtml"
|
||||
#line 85 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 81 "ErrorPage.cshtml"
|
||||
#line 86 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowHeaders)
|
||||
{
|
||||
|
||||
|
|
@ -339,7 +341,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li id=\"headers\" tabindex=\"4\">\r\n ");
|
||||
Write(
|
||||
#line 84 "ErrorPage.cshtml"
|
||||
#line 89 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_HeadersButton
|
||||
|
||||
#line default
|
||||
|
|
@ -347,14 +349,14 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("\r\n </li>\r\n");
|
||||
#line 86 "ErrorPage.cshtml"
|
||||
#line 91 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 87 "ErrorPage.cshtml"
|
||||
#line 92 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowEnvironment)
|
||||
{
|
||||
|
||||
|
|
@ -363,7 +365,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li id=\"environment\" tabindex=\"5\">\r\n ");
|
||||
Write(
|
||||
#line 90 "ErrorPage.cshtml"
|
||||
#line 95 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_EnvironmentButton
|
||||
|
||||
#line default
|
||||
|
|
@ -371,20 +373,20 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("\r\n </li>\r\n");
|
||||
#line 92 "ErrorPage.cshtml"
|
||||
#line 97 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </ul>\r\n");
|
||||
#line 94 "ErrorPage.cshtml"
|
||||
#line 99 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "ErrorPage.cshtml"
|
||||
#line 99 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowExceptionDetails)
|
||||
{
|
||||
|
||||
|
|
@ -392,26 +394,26 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <div id=\"stackpage\" class=\"page\">\r\n <ul>\r\n");
|
||||
#line 98 "ErrorPage.cshtml"
|
||||
#line 103 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 98 "ErrorPage.cshtml"
|
||||
#line 103 "ErrorPage.cshtml"
|
||||
int tabIndex = 6;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
#line 99 "ErrorPage.cshtml"
|
||||
#line 104 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "ErrorPage.cshtml"
|
||||
#line 104 "ErrorPage.cshtml"
|
||||
foreach (var errorDetail in Model.ErrorDetails)
|
||||
{
|
||||
|
||||
|
|
@ -421,7 +423,7 @@ using Views
|
|||
WriteLiteral(" <li>\r\n <h2 class=\"stackerror\">" +
|
||||
"");
|
||||
Write(
|
||||
#line 102 "ErrorPage.cshtml"
|
||||
#line 107 "ErrorPage.cshtml"
|
||||
errorDetail.Error.GetType().Name
|
||||
|
||||
#line default
|
||||
|
|
@ -430,7 +432,7 @@ using Views
|
|||
|
||||
WriteLiteral(": ");
|
||||
Write(
|
||||
#line 102 "ErrorPage.cshtml"
|
||||
#line 107 "ErrorPage.cshtml"
|
||||
errorDetail.Error.Message
|
||||
|
||||
#line default
|
||||
|
|
@ -438,13 +440,13 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</h2>\r\n <ul>\r\n");
|
||||
#line 104 "ErrorPage.cshtml"
|
||||
#line 109 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 104 "ErrorPage.cshtml"
|
||||
#line 109 "ErrorPage.cshtml"
|
||||
foreach (var frame in errorDetail.StackFrames)
|
||||
{
|
||||
|
||||
|
|
@ -452,35 +454,35 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <li class=\"frame\"");
|
||||
WriteAttribute("tabindex", Tuple.Create(" tabindex=\"", 4130), Tuple.Create("\"", 4150),
|
||||
Tuple.Create(Tuple.Create("", 4141), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 106 "ErrorPage.cshtml"
|
||||
WriteAttribute("tabindex", Tuple.Create(" tabindex=\"", 4214), Tuple.Create("\"", 4234),
|
||||
Tuple.Create(Tuple.Create("", 4225), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 111 "ErrorPage.cshtml"
|
||||
tabIndex
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4141), false));
|
||||
, 4225), false));
|
||||
WriteLiteral(">\r\n");
|
||||
#line 107 "ErrorPage.cshtml"
|
||||
#line 112 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "ErrorPage.cshtml"
|
||||
#line 112 "ErrorPage.cshtml"
|
||||
tabIndex++;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
#line 108 "ErrorPage.cshtml"
|
||||
#line 113 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 108 "ErrorPage.cshtml"
|
||||
#line 113 "ErrorPage.cshtml"
|
||||
if (string.IsNullOrEmpty(frame.File))
|
||||
{
|
||||
|
||||
|
|
@ -489,7 +491,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <h3>");
|
||||
Write(
|
||||
#line 110 "ErrorPage.cshtml"
|
||||
#line 115 "ErrorPage.cshtml"
|
||||
frame.Function
|
||||
|
||||
#line default
|
||||
|
|
@ -497,7 +499,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</h3>\r\n");
|
||||
#line 111 "ErrorPage.cshtml"
|
||||
#line 116 "ErrorPage.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -507,7 +509,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <h3>");
|
||||
Write(
|
||||
#line 114 "ErrorPage.cshtml"
|
||||
#line 119 "ErrorPage.cshtml"
|
||||
frame.Function
|
||||
|
||||
#line default
|
||||
|
|
@ -515,17 +517,17 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral(" in <code");
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4577), Tuple.Create("\"", 4596),
|
||||
Tuple.Create(Tuple.Create("", 4585), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 114 "ErrorPage.cshtml"
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4661), Tuple.Create("\"", 4680),
|
||||
Tuple.Create(Tuple.Create("", 4669), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 119 "ErrorPage.cshtml"
|
||||
frame.File
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4585), false));
|
||||
, 4669), false));
|
||||
WriteLiteral(">");
|
||||
Write(
|
||||
#line 114 "ErrorPage.cshtml"
|
||||
#line 119 "ErrorPage.cshtml"
|
||||
System.IO.Path.GetFileName(frame.File)
|
||||
|
||||
#line default
|
||||
|
|
@ -533,20 +535,20 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</code></h3>\r\n");
|
||||
#line 115 "ErrorPage.cshtml"
|
||||
#line 120 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
#line 117 "ErrorPage.cshtml"
|
||||
#line 122 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 117 "ErrorPage.cshtml"
|
||||
#line 122 "ErrorPage.cshtml"
|
||||
if (frame.Line != 0 && frame.ContextCode != null)
|
||||
{
|
||||
|
||||
|
|
@ -554,13 +556,13 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <div class=\"source\">\r\n");
|
||||
#line 120 "ErrorPage.cshtml"
|
||||
#line 125 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 120 "ErrorPage.cshtml"
|
||||
#line 125 "ErrorPage.cshtml"
|
||||
if (frame.PreContextCode != null)
|
||||
{
|
||||
|
||||
|
|
@ -568,22 +570,22 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <ol");
|
||||
WriteAttribute("start", Tuple.Create(" start=\"", 5059), Tuple.Create("\"", 5088),
|
||||
Tuple.Create(Tuple.Create("", 5067), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 122 "ErrorPage.cshtml"
|
||||
WriteAttribute("start", Tuple.Create(" start=\"", 5143), Tuple.Create("\"", 5172),
|
||||
Tuple.Create(Tuple.Create("", 5151), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 127 "ErrorPage.cshtml"
|
||||
frame.PreContextLine
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5067), false));
|
||||
, 5151), false));
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 123 "ErrorPage.cshtml"
|
||||
#line 128 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 123 "ErrorPage.cshtml"
|
||||
#line 128 "ErrorPage.cshtml"
|
||||
foreach (var line in frame.PreContextCode)
|
||||
{
|
||||
|
||||
|
|
@ -592,7 +594,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li><span>");
|
||||
Write(
|
||||
#line 125 "ErrorPage.cshtml"
|
||||
#line 130 "ErrorPage.cshtml"
|
||||
line
|
||||
|
||||
#line default
|
||||
|
|
@ -600,31 +602,31 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</span></li>\r\n");
|
||||
#line 126 "ErrorPage.cshtml"
|
||||
#line 131 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </ol>\r\n");
|
||||
#line 128 "ErrorPage.cshtml"
|
||||
#line 133 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n <ol");
|
||||
WriteAttribute("start", Tuple.Create(" start=\"", 5556), Tuple.Create("\"", 5575),
|
||||
Tuple.Create(Tuple.Create("", 5564), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 130 "ErrorPage.cshtml"
|
||||
WriteAttribute("start", Tuple.Create(" start=\"", 5640), Tuple.Create("\"", 5659),
|
||||
Tuple.Create(Tuple.Create("", 5648), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 135 "ErrorPage.cshtml"
|
||||
frame.Line
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5564), false));
|
||||
, 5648), false));
|
||||
WriteLiteral(" class=\"highlight\">\r\n <li><span>");
|
||||
Write(
|
||||
#line 131 "ErrorPage.cshtml"
|
||||
#line 136 "ErrorPage.cshtml"
|
||||
frame.ContextCode
|
||||
|
||||
#line default
|
||||
|
|
@ -632,13 +634,13 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</span></li></ol>\r\n\r\n");
|
||||
#line 133 "ErrorPage.cshtml"
|
||||
#line 138 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 133 "ErrorPage.cshtml"
|
||||
#line 138 "ErrorPage.cshtml"
|
||||
if (frame.PostContextCode != null)
|
||||
{
|
||||
|
||||
|
|
@ -646,22 +648,22 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <ol");
|
||||
WriteAttribute("start", Tuple.Create(" start=\'", 5873), Tuple.Create("\'", 5898),
|
||||
Tuple.Create(Tuple.Create("", 5881), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 135 "ErrorPage.cshtml"
|
||||
WriteAttribute("start", Tuple.Create(" start=\'", 5957), Tuple.Create("\'", 5982),
|
||||
Tuple.Create(Tuple.Create("", 5965), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 140 "ErrorPage.cshtml"
|
||||
frame.Line + 1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5881), false));
|
||||
, 5965), false));
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 136 "ErrorPage.cshtml"
|
||||
#line 141 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 136 "ErrorPage.cshtml"
|
||||
#line 141 "ErrorPage.cshtml"
|
||||
foreach (var line in frame.PostContextCode)
|
||||
{
|
||||
|
||||
|
|
@ -670,7 +672,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <li><span>");
|
||||
Write(
|
||||
#line 138 "ErrorPage.cshtml"
|
||||
#line 143 "ErrorPage.cshtml"
|
||||
line
|
||||
|
||||
#line default
|
||||
|
|
@ -678,49 +680,49 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</span></li>\r\n");
|
||||
#line 139 "ErrorPage.cshtml"
|
||||
#line 144 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </ol>\r\n");
|
||||
#line 141 "ErrorPage.cshtml"
|
||||
#line 146 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </div>\r\n");
|
||||
#line 143 "ErrorPage.cshtml"
|
||||
#line 148 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </li>\r\n");
|
||||
#line 145 "ErrorPage.cshtml"
|
||||
#line 150 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </ul>\r\n </li>\r\n");
|
||||
#line 148 "ErrorPage.cshtml"
|
||||
#line 153 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </ul>\r\n </div>\r\n");
|
||||
#line 151 "ErrorPage.cshtml"
|
||||
#line 156 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 152 "ErrorPage.cshtml"
|
||||
#line 157 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowQuery)
|
||||
{
|
||||
|
||||
|
|
@ -728,13 +730,13 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <div id=\"querypage\" class=\"page\">\r\n");
|
||||
#line 155 "ErrorPage.cshtml"
|
||||
#line 160 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 155 "ErrorPage.cshtml"
|
||||
#line 160 "ErrorPage.cshtml"
|
||||
if (Model.Query.Any())
|
||||
{
|
||||
|
||||
|
|
@ -744,7 +746,7 @@ using Views
|
|||
WriteLiteral(" <table>\r\n <thead>\r\n " +
|
||||
" <tr>\r\n <th>");
|
||||
Write(
|
||||
#line 160 "ErrorPage.cshtml"
|
||||
#line 165 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_VariableColumn
|
||||
|
||||
#line default
|
||||
|
|
@ -753,7 +755,7 @@ using Views
|
|||
|
||||
WriteLiteral("</th>\r\n <th>");
|
||||
Write(
|
||||
#line 161 "ErrorPage.cshtml"
|
||||
#line 166 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_ValueColumn
|
||||
|
||||
#line default
|
||||
|
|
@ -762,13 +764,13 @@ using Views
|
|||
|
||||
WriteLiteral("</th>\r\n </tr>\r\n </thead>\r\n " +
|
||||
" <tbody>\r\n");
|
||||
#line 165 "ErrorPage.cshtml"
|
||||
#line 170 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 165 "ErrorPage.cshtml"
|
||||
#line 170 "ErrorPage.cshtml"
|
||||
foreach (var kv in Model.Query.OrderBy(kv => kv.Key))
|
||||
{
|
||||
foreach (var v in kv.Value)
|
||||
|
|
@ -780,7 +782,7 @@ using Views
|
|||
WriteLiteral(" <tr>\r\n " +
|
||||
" <td>");
|
||||
Write(
|
||||
#line 170 "ErrorPage.cshtml"
|
||||
#line 175 "ErrorPage.cshtml"
|
||||
kv.Key
|
||||
|
||||
#line default
|
||||
|
|
@ -789,7 +791,7 @@ using Views
|
|||
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
Write(
|
||||
#line 171 "ErrorPage.cshtml"
|
||||
#line 176 "ErrorPage.cshtml"
|
||||
v
|
||||
|
||||
#line default
|
||||
|
|
@ -797,7 +799,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
#line 173 "ErrorPage.cshtml"
|
||||
#line 178 "ErrorPage.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -805,7 +807,7 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
#line 177 "ErrorPage.cshtml"
|
||||
#line 182 "ErrorPage.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -815,7 +817,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <p>");
|
||||
Write(
|
||||
#line 180 "ErrorPage.cshtml"
|
||||
#line 185 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_NoQueryStringData
|
||||
|
||||
#line default
|
||||
|
|
@ -823,21 +825,21 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</p>\r\n");
|
||||
#line 181 "ErrorPage.cshtml"
|
||||
#line 186 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </div>\r\n");
|
||||
#line 183 "ErrorPage.cshtml"
|
||||
#line 188 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 184 "ErrorPage.cshtml"
|
||||
#line 189 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowCookies)
|
||||
{
|
||||
/* TODO:
|
||||
|
|
@ -874,7 +876,7 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 215 "ErrorPage.cshtml"
|
||||
#line 220 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowHeaders)
|
||||
{
|
||||
|
||||
|
|
@ -882,13 +884,13 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" <div id=\"headerspage\" class=\"page\">\r\n");
|
||||
#line 218 "ErrorPage.cshtml"
|
||||
#line 223 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 218 "ErrorPage.cshtml"
|
||||
#line 223 "ErrorPage.cshtml"
|
||||
if (Model.Headers.Any())
|
||||
{
|
||||
|
||||
|
|
@ -898,7 +900,7 @@ using Views
|
|||
WriteLiteral(" <table>\r\n <thead>\r\n " +
|
||||
" <tr>\r\n <th>");
|
||||
Write(
|
||||
#line 223 "ErrorPage.cshtml"
|
||||
#line 228 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_VariableColumn
|
||||
|
||||
#line default
|
||||
|
|
@ -907,7 +909,7 @@ using Views
|
|||
|
||||
WriteLiteral("</th>\r\n <th>");
|
||||
Write(
|
||||
#line 224 "ErrorPage.cshtml"
|
||||
#line 229 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_ValueColumn
|
||||
|
||||
#line default
|
||||
|
|
@ -916,13 +918,13 @@ using Views
|
|||
|
||||
WriteLiteral("</th>\r\n </tr>\r\n </thead>\r\n " +
|
||||
" <tbody>\r\n");
|
||||
#line 228 "ErrorPage.cshtml"
|
||||
#line 233 "ErrorPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 228 "ErrorPage.cshtml"
|
||||
#line 233 "ErrorPage.cshtml"
|
||||
foreach (var kv in Model.Headers.OrderBy(kv => kv.Key))
|
||||
{
|
||||
foreach (var v in kv.Value)
|
||||
|
|
@ -934,7 +936,7 @@ using Views
|
|||
WriteLiteral(" <tr>\r\n " +
|
||||
" <td>");
|
||||
Write(
|
||||
#line 233 "ErrorPage.cshtml"
|
||||
#line 238 "ErrorPage.cshtml"
|
||||
kv.Key
|
||||
|
||||
#line default
|
||||
|
|
@ -943,7 +945,7 @@ using Views
|
|||
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
Write(
|
||||
#line 234 "ErrorPage.cshtml"
|
||||
#line 239 "ErrorPage.cshtml"
|
||||
v
|
||||
|
||||
#line default
|
||||
|
|
@ -951,7 +953,7 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
#line 236 "ErrorPage.cshtml"
|
||||
#line 241 "ErrorPage.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -959,7 +961,7 @@ using Views
|
|||
#line hidden
|
||||
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
#line 240 "ErrorPage.cshtml"
|
||||
#line 245 "ErrorPage.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -969,7 +971,7 @@ using Views
|
|||
|
||||
WriteLiteral(" <p>");
|
||||
Write(
|
||||
#line 243 "ErrorPage.cshtml"
|
||||
#line 248 "ErrorPage.cshtml"
|
||||
Resources.ErrorPageHtml_NoHeaderData
|
||||
|
||||
#line default
|
||||
|
|
@ -977,21 +979,21 @@ using Views
|
|||
);
|
||||
|
||||
WriteLiteral("</p>\r\n");
|
||||
#line 244 "ErrorPage.cshtml"
|
||||
#line 249 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </div>\r\n");
|
||||
#line 246 "ErrorPage.cshtml"
|
||||
#line 251 "ErrorPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" ");
|
||||
#line 247 "ErrorPage.cshtml"
|
||||
#line 252 "ErrorPage.cshtml"
|
||||
if (Model.Options.ShowEnvironment)
|
||||
{
|
||||
/* TODO:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@
|
|||
@using Views
|
||||
@functions
|
||||
{
|
||||
public ErrorPage(ErrorPageModel model)
|
||||
{
|
||||
Model = model;
|
||||
}
|
||||
|
||||
public ErrorPageModel Model { get; set; }
|
||||
}
|
||||
@{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,245 @@
|
|||
namespace Microsoft.AspNet.Diagnostics.Views
|
||||
{
|
||||
#line 1 "RuntimeInfoPage.cshtml"
|
||||
using System
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
;
|
||||
#line 2 "RuntimeInfoPage.cshtml"
|
||||
using System.Globalization
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
;
|
||||
#line 3 "RuntimeInfoPage.cshtml"
|
||||
using System.Linq
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
;
|
||||
#line 4 "RuntimeInfoPage.cshtml"
|
||||
using Microsoft.AspNet.Diagnostics
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
;
|
||||
#line 5 "RuntimeInfoPage.cshtml"
|
||||
using Microsoft.AspNet.Diagnostics.Views
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
;
|
||||
#line 6 "RuntimeInfoPage.cshtml"
|
||||
using Microsoft.Framework.Runtime;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class RuntimeInfoPage : Microsoft.AspNet.Diagnostics.Views.BaseView
|
||||
{
|
||||
#line 9 "RuntimeInfoPage.cshtml"
|
||||
|
||||
public RuntimeInfoPage(RuntimeInfoPageModel model)
|
||||
{
|
||||
Model = model;
|
||||
}
|
||||
|
||||
public RuntimeInfoPageModel Model { get; set; }
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#line hidden
|
||||
public RuntimeInfoPage()
|
||||
{
|
||||
}
|
||||
|
||||
#pragma warning disable 1998
|
||||
public override async Task ExecuteAsync()
|
||||
{
|
||||
WriteLiteral("\r\n");
|
||||
WriteLiteral("<!DOCTYPE html>\r\n<html");
|
||||
WriteAttribute("lang", Tuple.Create(" lang=\"", 372), Tuple.Create("\"", 433),
|
||||
Tuple.Create(Tuple.Create("", 379), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 18 "RuntimeInfoPage.cshtml"
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 379), false));
|
||||
WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n " +
|
||||
" <title>");
|
||||
Write(
|
||||
#line 21 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_Title
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</title>\r\n <style>\r\n body {\r\n font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;\r\n font-size: .813em;\r\n line-height: 1.4em;\r\n color: #222;\r\n}\r\n\r\nh1, h2, h3, h4, h5, th {\r\n font-weight: 100;\r\n}\r\n\r\nh1 {\r\n color: #44525e;\r\n margin: 15px 0 15px 0;\r\n}\r\n\r\nh2 {\r\n margin: 10px 5px 0 0;\r\n}\r\n\r\ntable .even{\r\n background-color: #f0f0f0;\r\n}\r\n\r\nth {\r\n font-size: 16px;\r\n}\r\n\r\n\r\n\r\n </style>\r" +
|
||||
"\n</head>\r\n<body>\r\n <h1>");
|
||||
Write(
|
||||
#line 27 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_RuntimeVersion
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</h1>\r\n <h2>");
|
||||
Write(
|
||||
#line 28 "RuntimeInfoPage.cshtml"
|
||||
string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</h2>\r\n \r\n <h1>");
|
||||
Write(
|
||||
#line 30 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_Packages
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</h1>\r\n");
|
||||
#line 31 "RuntimeInfoPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "RuntimeInfoPage.cshtml"
|
||||
if (@Resources.RuntimeInfoPage_Packages == null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" <h2>");
|
||||
Write(
|
||||
#line 33 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_PackagesFail
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</h2>\r\n");
|
||||
#line 34 "RuntimeInfoPage.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" <table>\r\n <thead>\r\n <tr>\r\n <" +
|
||||
"th>");
|
||||
Write(
|
||||
#line 40 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_PackageNameColumnName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</th>\r\n <th>");
|
||||
Write(
|
||||
#line 41 "RuntimeInfoPage.cshtml"
|
||||
Resources.RuntimeInfoPage_PackagePathColumnName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n");
|
||||
#line 45 "RuntimeInfoPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "RuntimeInfoPage.cshtml"
|
||||
bool even = false;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
#line 46 "RuntimeInfoPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "RuntimeInfoPage.cshtml"
|
||||
foreach (var package in Model.References.OrderBy(package => package.Name.ToLowerInvariant()))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" <tr");
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1494), Tuple.Create("\"", 1522),
|
||||
Tuple.Create(Tuple.Create("", 1502), Tuple.Create<System.Object, System.Int32>(
|
||||
#line 48 "RuntimeInfoPage.cshtml"
|
||||
even?"even":"odd"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1502), false));
|
||||
WriteLiteral(">\r\n <td>");
|
||||
Write(
|
||||
#line 49 "RuntimeInfoPage.cshtml"
|
||||
package.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
Write(
|
||||
#line 50 "RuntimeInfoPage.cshtml"
|
||||
package.Path
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
);
|
||||
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
#line 52 "RuntimeInfoPage.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "RuntimeInfoPage.cshtml"
|
||||
even = !even;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "RuntimeInfoPage.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
#line 56 "RuntimeInfoPage.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteral("</body>\r\n</html>\r\n");
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
@using System
|
||||
@using System.Globalization
|
||||
@using System.Linq
|
||||
@using Microsoft.AspNet.Diagnostics
|
||||
@using Microsoft.AspNet.Diagnostics.Views
|
||||
@using Microsoft.Framework.Runtime;
|
||||
|
||||
@functions
|
||||
{
|
||||
public RuntimeInfoPage(RuntimeInfoPageModel model)
|
||||
{
|
||||
Model = model;
|
||||
}
|
||||
|
||||
public RuntimeInfoPageModel Model { get; set; }
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>@Resources.RuntimeInfoPage_Title</title>
|
||||
<style>
|
||||
<%$ include: RuntimeInfoPage.css %>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>@Resources.RuntimeInfoPage_RuntimeVersion</h1>
|
||||
<h2>@(string.IsNullOrWhiteSpace(Model.Version) ? Resources.RuntimeInfoPage_RuntimeVersionFail : Model.Version)</h2>
|
||||
|
||||
<h1>@Resources.RuntimeInfoPage_Packages</h1>
|
||||
@if (@Resources.RuntimeInfoPage_Packages == null)
|
||||
{
|
||||
<h2>@Resources.RuntimeInfoPage_PackagesFail</h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@Resources.RuntimeInfoPage_PackageNameColumnName</th>
|
||||
<th>@Resources.RuntimeInfoPage_PackagePathColumnName</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@{ bool even = false; }
|
||||
@foreach (var package in Model.References.OrderBy(package => package.Name.ToLowerInvariant()))
|
||||
{
|
||||
<tr class="@(even?"even":"odd")">
|
||||
<td>@package.Name</td>
|
||||
<td>@package.Path</td>
|
||||
</tr>
|
||||
@{ even = !even; }
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: .813em;
|
||||
line-height: 1.4em;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, th {
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #44525e;
|
||||
margin: 15px 0 15px 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 10px 5px 0 0;
|
||||
}
|
||||
|
||||
table .even{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.Framework.Runtime;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics.Views
|
||||
{
|
||||
public class RuntimeInfoPageModel
|
||||
{
|
||||
public string Version { get; internal set; }
|
||||
|
||||
public IEnumerable<ILibraryInformation> References { get; internal set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
"dependencies": {
|
||||
"Microsoft.AspNet.FeatureModel": "1.0.0-*",
|
||||
"Microsoft.AspNet.Http": "1.0.0-*",
|
||||
"Microsoft.AspNet.PipelineCore": "1.0.0-*"
|
||||
"Microsoft.AspNet.PipelineCore": "1.0.0-*",
|
||||
"Microsoft.Framework.Runtime.Interfaces": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"aspnet50": {},
|
||||
|
|
@ -18,6 +19,7 @@
|
|||
"System.IO.FileSystem": "4.0.0.0",
|
||||
"System.Linq": "4.0.0.0",
|
||||
"System.Reflection": "4.0.10.0",
|
||||
"System.Reflection.Extensions": "4.0.0.0",
|
||||
"System.Resources.ResourceManager": "4.0.0.0",
|
||||
"System.Runtime": "4.0.20.0",
|
||||
"System.Runtime.Extensions": "4.0.10.0",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>994351b4-7b2a-4139-8b72-72c5bb5cc618</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Microsoft.AspNet.Diagnostics.Tests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.Framework.Runtime;
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics.Tests
|
||||
{
|
||||
public class RuntimeInfoMiddlewareTest
|
||||
{
|
||||
private const string DefaultPath = "/runtimeinfo";
|
||||
|
||||
[Fact]
|
||||
public void DefaultPageOptions_HasDefaultPath()
|
||||
{
|
||||
// Arrange & act
|
||||
var options = new RuntimeInfoPageOptions();
|
||||
|
||||
// Assert
|
||||
Assert.Equal(DefaultPath, options.Path.Value);
|
||||
}
|
||||
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public void CreateRuntimeInfoModel_GetsTheVersionAndAllPackages()
|
||||
{
|
||||
// Arrage
|
||||
var libraries = new ILibraryInformation[] {
|
||||
new FakeLibraryInformation() { Name ="LibInfo1", Path = "Path1" },
|
||||
new FakeLibraryInformation() { Name ="LibInfo2", Path = "Path2" },
|
||||
};
|
||||
|
||||
var libraryManagerMock = new Mock<ILibraryManager>(MockBehavior.Strict);
|
||||
libraryManagerMock.Setup(l => l.GetLibraries()).Returns(libraries);
|
||||
|
||||
RequestDelegate next = _ =>
|
||||
{
|
||||
return Task.FromResult<object>(null);
|
||||
};
|
||||
|
||||
var middleware = new RuntimeInfoMiddleware(
|
||||
next,
|
||||
new RuntimeInfoPageOptions(),
|
||||
libraryManagerMock.Object);
|
||||
|
||||
// Act
|
||||
var model = middleware.CreateRuntimeInfoModel();
|
||||
|
||||
// Assert
|
||||
Assert.False(string.IsNullOrWhiteSpace(model.Version));
|
||||
Assert.Same(libraries, model.References);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async void Invoke_WithNonMatchingPath_IgnoresRequest()
|
||||
{
|
||||
// Arrange
|
||||
var libraryManagerMock = new Mock<ILibraryManager>(MockBehavior.Strict);
|
||||
|
||||
RequestDelegate next = _ =>
|
||||
{
|
||||
return Task.FromResult<object>(null);
|
||||
};
|
||||
|
||||
var middleware = new RuntimeInfoMiddleware(
|
||||
next,
|
||||
new RuntimeInfoPageOptions(),
|
||||
libraryManagerMock.Object);
|
||||
|
||||
var contextMock = new Mock<HttpContext>(MockBehavior.Strict);
|
||||
contextMock
|
||||
.SetupGet(c => c.Request.Path)
|
||||
.Returns(new PathString("/nonmatchingpath"));
|
||||
|
||||
// Act
|
||||
await middleware.Invoke(contextMock.Object);
|
||||
|
||||
// Assert
|
||||
contextMock.VerifyGet(c => c.Request.Path, Times.Once());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async void Invoke_WithMatchingPath_ReturnsInfoPage()
|
||||
{
|
||||
// Arrange
|
||||
var libraryManagerMock = new Mock<ILibraryManager>(MockBehavior.Strict);
|
||||
libraryManagerMock.Setup(l => l.GetLibraries()).Returns(new ILibraryInformation[] {
|
||||
new FakeLibraryInformation() { Name ="LibInfo1", Path = "Path1" },
|
||||
new FakeLibraryInformation() { Name ="LibInfo2", Path = "Path2" },
|
||||
});
|
||||
|
||||
RequestDelegate next = _ =>
|
||||
{
|
||||
return Task.FromResult<object>(null);
|
||||
};
|
||||
|
||||
var middleware = new RuntimeInfoMiddleware(
|
||||
next,
|
||||
new RuntimeInfoPageOptions(),
|
||||
libraryManagerMock.Object);
|
||||
|
||||
var buffer = new byte[4096];
|
||||
using (var responseStream = new MemoryStream(buffer))
|
||||
{
|
||||
var contextMock = new Mock<HttpContext>(MockBehavior.Strict);
|
||||
contextMock
|
||||
.SetupGet(c => c.Request.Path)
|
||||
.Returns(new PathString("/runtimeinfo"));
|
||||
contextMock
|
||||
.SetupGet(c => c.Response.Body)
|
||||
.Returns(responseStream);
|
||||
|
||||
// Act
|
||||
await middleware.Invoke(contextMock.Object);
|
||||
|
||||
// Assert
|
||||
string response = Encoding.UTF8.GetString(buffer);
|
||||
|
||||
Assert.True(response.Contains("<td>LibInfo1</td>"));
|
||||
Assert.True(response.Contains("<td>Path1</td>"));
|
||||
Assert.True(response.Contains("<td>LibInfo2</td>"));
|
||||
Assert.True(response.Contains("<td>Path2</td>"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private class FakeLibraryInformation : ILibraryInformation
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public IEnumerable<string> Dependencies
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException("Should not be needed by this middleware");
|
||||
}
|
||||
}
|
||||
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException("Should not be needed by this middleware");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"compilationOptions": {
|
||||
"warningsAsErrors": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Diagnostics": "",
|
||||
"Xunit.KRunner": "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq": "4.2.1312.1622"
|
||||
}
|
||||
},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Runtime": "4.0.20.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
"test": "Xunit.KRunner"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue