Add logger extensions with event ids (#405)

Addresses #393
This commit is contained in:
Jass Bagga 2017-09-15 14:26:47 -07:00 committed by GitHub
parent 479eb49ca9
commit d22bb2c908
12 changed files with 393 additions and 448 deletions

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;

View File

@ -8,6 +8,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal;
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views; using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
@ -115,7 +116,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
if (context == null) if (context == null)
{ {
_logger.LogError(Strings.FormatDatabaseErrorPageMiddleware_ContextNotRegistered(contextType.FullName)); _logger.ContextNotRegisteredDatabaseErrorPageMiddleware(contextType.FullName);
} }
else else
{ {
@ -123,7 +124,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
if (relationalDatabaseCreator == null) if (relationalDatabaseCreator == null)
{ {
_logger.LogDebug(Strings.DatabaseErrorPage_NotRelationalDatabase); _logger.NotRelationalDatabase();
} }
else else
{ {
@ -164,10 +165,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
} }
catch (Exception e) catch (Exception e)
{ {
_logger.LogError( _logger.DatabaseErrorPageMiddlewareException(e);
eventId: 0,
exception: e,
message: Strings.DatabaseErrorPageMiddleware_Exception);
} }
throw; throw;
@ -176,13 +174,13 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
private bool ShouldDisplayErrorPage(Exception exception) private bool ShouldDisplayErrorPage(Exception exception)
{ {
_logger.LogDebug(Strings.FormatDatabaseErrorPage_AttemptingToMatchException(exception.GetType())); _logger.AttemptingToMatchException(exception.GetType());
var lastRecordedException = _localDiagnostic.Value.Exception; var lastRecordedException = _localDiagnostic.Value.Exception;
if (lastRecordedException == null) if (lastRecordedException == null)
{ {
_logger.LogDebug(Strings.DatabaseErrorPage_NoRecordedException); _logger.NoRecordedException();
return false; return false;
} }
@ -196,12 +194,12 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
if (!match) if (!match)
{ {
_logger.LogDebug(Strings.DatabaseErrorPage_NoMatch); _logger.NoMatch();
return false; return false;
} }
_logger.LogDebug(Strings.DatabaseErrorPage_Matched); _logger.Matched();
return true; return true;
} }
@ -219,17 +217,17 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
switch (keyValuePair.Value) switch (keyValuePair.Value)
{ {
case DbContextErrorEventData contextErrorEventData: case DbContextErrorEventData contextErrorEventData:
{ {
_localDiagnostic.Value.Hold(contextErrorEventData.Exception, contextErrorEventData.Context.GetType()); _localDiagnostic.Value.Hold(contextErrorEventData.Exception, contextErrorEventData.Context.GetType());
break; break;
} }
case DbContextTypeErrorEventData contextTypeErrorEventData: case DbContextTypeErrorEventData contextTypeErrorEventData:
{ {
_localDiagnostic.Value.Hold(contextTypeErrorEventData.Exception, contextTypeErrorEventData.ContextType); _localDiagnostic.Value.Hold(contextTypeErrorEventData.Exception, contextTypeErrorEventData.ContextType);
break; break;
} }
} }
} }

View File

@ -0,0 +1,153 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal
{
internal static class DiagnosticsEntityFrameworkCoreLoggerExtensions
{
// MigrationsEndPointMiddleware
private static readonly Action<ILogger, Exception> _noContextType = LoggerMessage.Define(
LogLevel.Error,
new EventId(1, "NoContextType"),
"No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.");
private static readonly Action<ILogger, string, Exception> _invalidContextType = LoggerMessage.Define<string>(
LogLevel.Error,
new EventId(2, "InvalidContextType"),
"The context type '{ContextTypeName}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for.");
private static readonly Action<ILogger, string, Exception> _contextNotRegistered = LoggerMessage.Define<string>(
LogLevel.Error,
new EventId(3, "ContextNotRegistered"),
"The context type '{ContextTypeName}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped<>() inside the UseServices(...) call in your application startup code.");
private static readonly Action<ILogger, string, Exception> _requestPathMatched = LoggerMessage.Define<string>(
LogLevel.Debug,
new EventId(4, "RequestPathMatched"),
"Request path matched the path configured for this migrations endpoint({RequestPath}). Attempting to process the migrations request.");
private static readonly Action<ILogger, string, Exception> _applyingMigrations = LoggerMessage.Define<string>(
LogLevel.Debug,
new EventId(5, "ApplyingMigrations"),
"Request is valid, applying migrations for context '{ContextTypeName}'");
private static readonly Action<ILogger, string, Exception> _migrationsApplied = LoggerMessage.Define<string>(
LogLevel.Debug,
new EventId(6, "MigrationsApplied"),
"Migrations successfully applied for context '{ContextTypeName}'.");
private static readonly Action<ILogger, string, Exception> _migrationsEndPointMiddlewareException = LoggerMessage.Define<string>(
LogLevel.Error,
new EventId(7, "MigrationsEndPointException"),
"An error occurred while applying the migrations for '{ContextTypeName}'. See InnerException for details:");
// DatabaseErrorPageMiddleware
private static readonly Action<ILogger, Type, Exception> _attemptingToMatchException = LoggerMessage.Define<Type>(
LogLevel.Debug,
new EventId(1, "AttemptingToMatchException"),
"{ExceptionType} occurred, checking if Entity Framework recorded this exception as resulting from a failed database operation.");
private static readonly Action<ILogger, Exception> _noRecordedException = LoggerMessage.Define(
LogLevel.Debug,
new EventId(2, "NoRecordedException"),
"Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services.");
private static readonly Action<ILogger, Exception> _noMatch = LoggerMessage.Define(
LogLevel.Debug,
new EventId(3, "NoMatchFound"),
"The current exception (and its inner exceptions) do not match the last exception Entity Framework recorded due to a failed database operation. This means the database operation exception was handled and another exception occurred later in the request.");
private static readonly Action<ILogger, Exception> _matched = LoggerMessage.Define(
LogLevel.Debug,
new EventId(4, "MatchFound"),
"Entity Framework recorded that the current exception was due to a failed database operation. Attempting to show database error page.");
private static readonly Action<ILogger, string, Exception> _contextNotRegisteredDatabaseErrorPageMiddleware = LoggerMessage.Define<string>(
LogLevel.Error,
new EventId(5, "ContextNotRegistered"),
"The context type '{ContextTypeName}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped<>() inside the UseServices(...) call in your application startup code. Skipping display of the database error page.");
private static readonly Action<ILogger, Exception> _notRelationalDatabase = LoggerMessage.Define(
LogLevel.Debug,
new EventId(6, "NotRelationalDatabase"),
"The target data store is not a relational database. Skipping the database error page.");
private static readonly Action<ILogger, Exception> _databaseErrorPageMiddlewareException = LoggerMessage.Define(
LogLevel.Error,
new EventId(7, "DatabaseErrorPageException"),
"An exception occurred while calculating the database error page content. Skipping display of the database error page.");
public static void NoContextType(this ILogger logger)
{
_noContextType(logger, null);
}
public static void InvalidContextType(this ILogger logger, string contextTypeName)
{
_invalidContextType(logger, contextTypeName, null);
}
public static void ContextNotRegistered(this ILogger logger, string contextTypeName)
{
_contextNotRegistered(logger, contextTypeName, null);
}
public static void RequestPathMatched(this ILogger logger, string requestPath)
{
_requestPathMatched(logger, requestPath, null);
}
public static void ApplyingMigrations(this ILogger logger, string contextTypeName)
{
_applyingMigrations(logger, contextTypeName, null);
}
public static void MigrationsApplied(this ILogger logger, string contextTypeName)
{
_migrationsApplied(logger, contextTypeName, null);
}
public static void MigrationsEndPointMiddlewareException(this ILogger logger, string context, Exception exception)
{
_migrationsEndPointMiddlewareException(logger, context, exception);
}
public static void AttemptingToMatchException(this ILogger logger, Type exceptionType)
{
_attemptingToMatchException(logger, exceptionType, null);
}
public static void NoRecordedException(this ILogger logger)
{
_noRecordedException(logger, null);
}
public static void NoMatch(this ILogger logger)
{
_noMatch(logger, null);
}
public static void Matched(this ILogger logger)
{
_matched(logger, null);
}
public static void NotRelationalDatabase(this ILogger logger)
{
_notRelationalDatabase(logger, null);
}
public static void ContextNotRegisteredDatabaseErrorPageMiddleware(this ILogger logger, string contextTypeName)
{
_contextNotRegisteredDatabaseErrorPageMiddleware(logger, contextTypeName, null);
}
public static void DatabaseErrorPageMiddlewareException(this ILogger logger, Exception exception)
{
_databaseErrorPageMiddlewareException(logger, exception);
}
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -66,7 +67,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
if (context.Request.Path.Equals(_options.Path)) if (context.Request.Path.Equals(_options.Path))
{ {
_logger.LogDebug(Strings.FormatMigrationsEndPointMiddleware_RequestPathMatched(context.Request.Path)); _logger.RequestPathMatched(context.Request.Path);
var db = await GetDbContext(context, _logger); var db = await GetDbContext(context, _logger);
@ -74,7 +75,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
{ {
try try
{ {
_logger.LogDebug(Strings.FormatMigrationsEndPointMiddleware_ApplyingMigrations(db.GetType().FullName)); _logger.ApplyingMigrations(db.GetType().FullName);
db.Database.Migrate(); db.Database.Migrate();
@ -82,13 +83,13 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
context.Response.Headers.Add("Pragma", new[] { "no-cache" }); context.Response.Headers.Add("Pragma", new[] { "no-cache" });
context.Response.Headers.Add("Cache-Control", new[] { "no-cache" }); context.Response.Headers.Add("Cache-Control", new[] { "no-cache" });
_logger.LogDebug(Strings.FormatMigrationsEndPointMiddleware_Applied(db.GetType().FullName)); _logger.MigrationsApplied(db.GetType().FullName);
} }
catch (Exception ex) catch (Exception ex)
{ {
var message = Strings.FormatMigrationsEndPointMiddleware_Exception(db.GetType().FullName) + ex; var message = Strings.FormatMigrationsEndPointMiddleware_Exception(db.GetType().FullName) + ex;
_logger.LogError(message); _logger.MigrationsEndPointMiddlewareException(db.GetType().FullName, ex);
throw new InvalidOperationException(message, ex); throw new InvalidOperationException(message, ex);
} }
@ -107,7 +108,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
if (string.IsNullOrWhiteSpace(contextTypeName)) if (string.IsNullOrWhiteSpace(contextTypeName))
{ {
logger.LogError(Strings.MigrationsEndPointMiddleware_NoContextType); logger.NoContextType();
await WriteErrorToResponse(context.Response, Strings.MigrationsEndPointMiddleware_NoContextType); await WriteErrorToResponse(context.Response, Strings.MigrationsEndPointMiddleware_NoContextType);
@ -120,7 +121,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
{ {
var message = Strings.FormatMigrationsEndPointMiddleware_InvalidContextType(contextTypeName); var message = Strings.FormatMigrationsEndPointMiddleware_InvalidContextType(contextTypeName);
logger.LogError(message); logger.InvalidContextType(contextTypeName);
await WriteErrorToResponse(context.Response, message); await WriteErrorToResponse(context.Response, message);
@ -133,7 +134,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
{ {
var message = Strings.FormatMigrationsEndPointMiddleware_ContextNotRegistered(contextType.FullName); var message = Strings.FormatMigrationsEndPointMiddleware_ContextNotRegistered(contextType.FullName);
logger.LogError(message); logger.ContextNotRegistered(contextType.FullName);
await WriteErrorToResponse(context.Response, message); await WriteErrorToResponse(context.Response, message);

View File

@ -11,548 +11,382 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
= new ResourceManager("Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Strings", typeof(Strings).GetTypeInfo().Assembly); = new ResourceManager("Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Strings", typeof(Strings).GetTypeInfo().Assembly);
/// <summary> /// <summary>
/// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page. /// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page.
/// </summary> /// </summary>
internal static string DatabaseErrorPageMiddleware_ContextNotRegistered internal static string DatabaseErrorPageMiddleware_ContextNotRegistered
{ {
get { return GetString("DatabaseErrorPageMiddleware_ContextNotRegistered"); } get => GetString("DatabaseErrorPageMiddleware_ContextNotRegistered");
} }
/// <summary> /// <summary>
/// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page. /// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page.
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPageMiddleware_ContextNotRegistered(object p0) internal static string FormatDatabaseErrorPageMiddleware_ContextNotRegistered(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPageMiddleware_ContextNotRegistered"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPageMiddleware_ContextNotRegistered"), p0);
}
/// <summary> /// <summary>
/// An exception occurred while calculating the database error page content. Skipping display of the database error page. /// An exception occurred while calculating the database error page content. Skipping display of the database error page.
/// </summary> /// </summary>
internal static string DatabaseErrorPageMiddleware_Exception internal static string DatabaseErrorPageMiddleware_Exception
{ {
get { return GetString("DatabaseErrorPageMiddleware_Exception"); } get => GetString("DatabaseErrorPageMiddleware_Exception");
} }
/// <summary> /// <summary>
/// An exception occurred while calculating the database error page content. Skipping display of the database error page. /// An exception occurred while calculating the database error page content. Skipping display of the database error page.
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPageMiddleware_Exception() internal static string FormatDatabaseErrorPageMiddleware_Exception()
{ => GetString("DatabaseErrorPageMiddleware_Exception");
return GetString("DatabaseErrorPageMiddleware_Exception");
}
/// <summary> /// <summary>
/// &gt; dotnet ef migrations add [migration name] /// &gt; dotnet ef migrations add [migration name]
/// </summary> /// </summary>
internal static string DatabaseErrorPage_AddMigrationCommandCLI internal static string DatabaseErrorPage_AddMigrationCommandCLI
{ {
get { return GetString("DatabaseErrorPage_AddMigrationCommandCLI"); } get => GetString("DatabaseErrorPage_AddMigrationCommandCLI");
} }
/// <summary> /// <summary>
/// &gt; dotnet ef migrations add [migration name] /// &gt; dotnet ef migrations add [migration name]
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_AddMigrationCommandCLI() internal static string FormatDatabaseErrorPage_AddMigrationCommandCLI()
{ => GetString("DatabaseErrorPage_AddMigrationCommandCLI");
return GetString("DatabaseErrorPage_AddMigrationCommandCLI");
}
/// <summary> /// <summary>
/// Apply Migrations /// Apply Migrations
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsButton internal static string DatabaseErrorPage_ApplyMigrationsButton
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsButton"); } get => GetString("DatabaseErrorPage_ApplyMigrationsButton");
} }
/// <summary> /// <summary>
/// Apply Migrations /// Apply Migrations
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsButton() internal static string FormatDatabaseErrorPage_ApplyMigrationsButton()
{ => GetString("DatabaseErrorPage_ApplyMigrationsButton");
return GetString("DatabaseErrorPage_ApplyMigrationsButton");
}
/// <summary> /// <summary>
/// Migrations Applied /// Migrations Applied
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsButtonDone internal static string DatabaseErrorPage_ApplyMigrationsButtonDone
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsButtonDone"); } get => GetString("DatabaseErrorPage_ApplyMigrationsButtonDone");
} }
/// <summary> /// <summary>
/// Migrations Applied /// Migrations Applied
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsButtonDone() internal static string FormatDatabaseErrorPage_ApplyMigrationsButtonDone()
{ => GetString("DatabaseErrorPage_ApplyMigrationsButtonDone");
return GetString("DatabaseErrorPage_ApplyMigrationsButtonDone");
}
/// <summary> /// <summary>
/// Applying Migrations... /// Applying Migrations...
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsButtonRunning internal static string DatabaseErrorPage_ApplyMigrationsButtonRunning
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsButtonRunning"); } get => GetString("DatabaseErrorPage_ApplyMigrationsButtonRunning");
} }
/// <summary> /// <summary>
/// Applying Migrations... /// Applying Migrations...
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsButtonRunning() internal static string FormatDatabaseErrorPage_ApplyMigrationsButtonRunning()
{ => GetString("DatabaseErrorPage_ApplyMigrationsButtonRunning");
return GetString("DatabaseErrorPage_ApplyMigrationsButtonRunning");
}
/// <summary> /// <summary>
/// An error occurred applying migrations, try applying them from the command line /// An error occurred applying migrations, try applying them from the command line
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsFailed internal static string DatabaseErrorPage_ApplyMigrationsFailed
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsFailed"); } get => GetString("DatabaseErrorPage_ApplyMigrationsFailed");
} }
/// <summary> /// <summary>
/// An error occurred applying migrations, try applying them from the command line /// An error occurred applying migrations, try applying them from the command line
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsFailed() internal static string FormatDatabaseErrorPage_ApplyMigrationsFailed()
{ => GetString("DatabaseErrorPage_ApplyMigrationsFailed");
return GetString("DatabaseErrorPage_ApplyMigrationsFailed");
}
/// <summary> /// <summary>
/// In Visual Studio, you can use Package Manager Console apply pending migrations to the database: /// In Visual Studio, you can use the Package Manager Console to apply pending migrations to the database:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_HowToApplyFromPMC internal static string DatabaseErrorPage_HowToApplyFromPMC
{ {
get { return GetString("DatabaseErrorPage_HowToApplyFromPMC"); } get => GetString("DatabaseErrorPage_HowToApplyFromPMC");
} }
/// <summary> /// <summary>
/// In Visual Studio, you can use Package Manager Console apply pending migrations to the database: /// In Visual Studio, you can use the Package Manager Console to apply pending migrations to the database:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_HowToApplyFromPMC() internal static string FormatDatabaseErrorPage_HowToApplyFromPMC()
{ => GetString("DatabaseErrorPage_HowToApplyFromPMC");
return GetString("DatabaseErrorPage_HowToApplyFromPMC");
}
/// <summary> /// <summary>
/// Try refreshing the page /// Try refreshing the page
/// </summary> /// </summary>
internal static string DatabaseErrorPage_MigrationsAppliedRefresh internal static string DatabaseErrorPage_MigrationsAppliedRefresh
{ {
get { return GetString("DatabaseErrorPage_MigrationsAppliedRefresh"); } get => GetString("DatabaseErrorPage_MigrationsAppliedRefresh");
} }
/// <summary> /// <summary>
/// Try refreshing the page /// Try refreshing the page
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_MigrationsAppliedRefresh() internal static string FormatDatabaseErrorPage_MigrationsAppliedRefresh()
{ => GetString("DatabaseErrorPage_MigrationsAppliedRefresh");
return GetString("DatabaseErrorPage_MigrationsAppliedRefresh");
}
/// <summary> /// <summary>
/// In Visual Studio, use Package Manager Console to scaffold a new migration and apply it to the database: /// In Visual Studio, use the Package Manager Console to scaffold a new migration and apply it to the database:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_NoDbOrMigrationsInfoPMC internal static string DatabaseErrorPage_NoDbOrMigrationsInfoPMC
{ {
get { return GetString("DatabaseErrorPage_NoDbOrMigrationsInfoPMC"); } get => GetString("DatabaseErrorPage_NoDbOrMigrationsInfoPMC");
} }
/// <summary> /// <summary>
/// In Visual Studio, use Package Manager Console to scaffold a new migration and apply it to the database: /// In Visual Studio, use the Package Manager Console to scaffold a new migration and apply it to the database:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_NoDbOrMigrationsInfoPMC() internal static string FormatDatabaseErrorPage_NoDbOrMigrationsInfoPMC()
{ => GetString("DatabaseErrorPage_NoDbOrMigrationsInfoPMC");
return GetString("DatabaseErrorPage_NoDbOrMigrationsInfoPMC");
}
/// <summary> /// <summary>
/// Use migrations to create the database for {0} /// Use migrations to create the database for {0}
/// </summary> /// </summary>
internal static string DatabaseErrorPage_NoDbOrMigrationsTitle internal static string DatabaseErrorPage_NoDbOrMigrationsTitle
{ {
get { return GetString("DatabaseErrorPage_NoDbOrMigrationsTitle"); } get => GetString("DatabaseErrorPage_NoDbOrMigrationsTitle");
} }
/// <summary> /// <summary>
/// Use migrations to create the database for {0} /// Use migrations to create the database for {0}
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_NoDbOrMigrationsTitle(object p0) internal static string FormatDatabaseErrorPage_NoDbOrMigrationsTitle(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_NoDbOrMigrationsTitle"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_NoDbOrMigrationsTitle"), p0);
}
/// <summary> /// <summary>
/// In Visual Studio, use Package Manager Console to scaffold a new migration for these changes and apply them to the database: /// In Visual Studio, use the Package Manager Console to scaffold a new migration for these changes and apply them to the database:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_PendingChangesInfoPMC internal static string DatabaseErrorPage_PendingChangesInfoPMC
{ {
get { return GetString("DatabaseErrorPage_PendingChangesInfoPMC"); } get => GetString("DatabaseErrorPage_PendingChangesInfoPMC");
} }
/// <summary> /// <summary>
/// In Visual Studio, use Package Manager Console to scaffold a new migration for these changes and apply them to the database: /// In Visual Studio, use the Package Manager Console to scaffold a new migration for these changes and apply them to the database:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_PendingChangesInfoPMC() internal static string FormatDatabaseErrorPage_PendingChangesInfoPMC()
{ => GetString("DatabaseErrorPage_PendingChangesInfoPMC");
return GetString("DatabaseErrorPage_PendingChangesInfoPMC");
}
/// <summary> /// <summary>
/// There are pending model changes for {0} /// There are pending model changes for {0}
/// </summary> /// </summary>
internal static string DatabaseErrorPage_PendingChangesTitle internal static string DatabaseErrorPage_PendingChangesTitle
{ {
get { return GetString("DatabaseErrorPage_PendingChangesTitle"); } get => GetString("DatabaseErrorPage_PendingChangesTitle");
} }
/// <summary> /// <summary>
/// There are pending model changes for {0} /// There are pending model changes for {0}
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_PendingChangesTitle(object p0) internal static string FormatDatabaseErrorPage_PendingChangesTitle(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingChangesTitle"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingChangesTitle"), p0);
}
/// <summary> /// <summary>
/// There are migrations for {0} that have not been applied to the database /// There are migrations for {0} that have not been applied to the database
/// </summary> /// </summary>
internal static string DatabaseErrorPage_PendingMigrationsInfo internal static string DatabaseErrorPage_PendingMigrationsInfo
{ {
get { return GetString("DatabaseErrorPage_PendingMigrationsInfo"); } get => GetString("DatabaseErrorPage_PendingMigrationsInfo");
} }
/// <summary> /// <summary>
/// There are migrations for {0} that have not been applied to the database /// There are migrations for {0} that have not been applied to the database
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_PendingMigrationsInfo(object p0) internal static string FormatDatabaseErrorPage_PendingMigrationsInfo(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingMigrationsInfo"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingMigrationsInfo"), p0);
}
/// <summary> /// <summary>
/// Applying existing migrations for {0} may resolve this issue /// Applying existing migrations for {0} may resolve this issue
/// </summary> /// </summary>
internal static string DatabaseErrorPage_PendingMigrationsTitle internal static string DatabaseErrorPage_PendingMigrationsTitle
{ {
get { return GetString("DatabaseErrorPage_PendingMigrationsTitle"); } get => GetString("DatabaseErrorPage_PendingMigrationsTitle");
} }
/// <summary> /// <summary>
/// Applying existing migrations for {0} may resolve this issue /// Applying existing migrations for {0} may resolve this issue
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_PendingMigrationsTitle(object p0) internal static string FormatDatabaseErrorPage_PendingMigrationsTitle(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingMigrationsTitle"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_PendingMigrationsTitle"), p0);
}
/// <summary> /// <summary>
/// &gt; dotnet ef database update /// &gt; dotnet ef database update
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsCommandCLI internal static string DatabaseErrorPage_ApplyMigrationsCommandCLI
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsCommandCLI"); } get => GetString("DatabaseErrorPage_ApplyMigrationsCommandCLI");
} }
/// <summary> /// <summary>
/// &gt; dotnet ef database update /// &gt; dotnet ef database update
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsCommandCLI() internal static string FormatDatabaseErrorPage_ApplyMigrationsCommandCLI()
{ => GetString("DatabaseErrorPage_ApplyMigrationsCommandCLI");
return GetString("DatabaseErrorPage_ApplyMigrationsCommandCLI");
}
/// <summary>
/// Migrations successfully applied for context '{0}'.
/// </summary>
internal static string MigrationsEndPointMiddleware_Applied
{
get { return GetString("MigrationsEndPointMiddleware_Applied"); }
}
/// <summary>
/// Migrations successfully applied for context '{0}'.
/// </summary>
internal static string FormatMigrationsEndPointMiddleware_Applied(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_Applied"), p0);
}
/// <summary>
/// Request is valid, applying migrations for context '{0}'.
/// </summary>
internal static string MigrationsEndPointMiddleware_ApplyingMigrations
{
get { return GetString("MigrationsEndPointMiddleware_ApplyingMigrations"); }
}
/// <summary>
/// Request is valid, applying migrations for context '{0}'.
/// </summary>
internal static string FormatMigrationsEndPointMiddleware_ApplyingMigrations(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_ApplyingMigrations"), p0);
}
/// <summary> /// <summary>
/// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code. /// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code.
/// </summary> /// </summary>
internal static string MigrationsEndPointMiddleware_ContextNotRegistered internal static string MigrationsEndPointMiddleware_ContextNotRegistered
{ {
get { return GetString("MigrationsEndPointMiddleware_ContextNotRegistered"); } get => GetString("MigrationsEndPointMiddleware_ContextNotRegistered");
} }
/// <summary> /// <summary>
/// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code. /// The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code.
/// </summary> /// </summary>
internal static string FormatMigrationsEndPointMiddleware_ContextNotRegistered(object p0) internal static string FormatMigrationsEndPointMiddleware_ContextNotRegistered(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_ContextNotRegistered"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_ContextNotRegistered"), p0);
}
/// <summary> /// <summary>
/// An error occurred while applying the migrations for '{0}'. See InnerException for details. /// An error occurred while applying the migrations for '{0}'. See InnerException for details.
/// </summary> /// </summary>
internal static string MigrationsEndPointMiddleware_Exception internal static string MigrationsEndPointMiddleware_Exception
{ {
get { return GetString("MigrationsEndPointMiddleware_Exception"); } get => GetString("MigrationsEndPointMiddleware_Exception");
} }
/// <summary> /// <summary>
/// An error occurred while applying the migrations for '{0}'. See InnerException for details. /// An error occurred while applying the migrations for '{0}'. See InnerException for details.
/// </summary> /// </summary>
internal static string FormatMigrationsEndPointMiddleware_Exception(object p0) internal static string FormatMigrationsEndPointMiddleware_Exception(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_Exception"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_Exception"), p0);
}
/// <summary> /// <summary>
/// The context type '{0}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for. /// The context type '{0}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for.
/// </summary> /// </summary>
internal static string MigrationsEndPointMiddleware_InvalidContextType internal static string MigrationsEndPointMiddleware_InvalidContextType
{ {
get { return GetString("MigrationsEndPointMiddleware_InvalidContextType"); } get => GetString("MigrationsEndPointMiddleware_InvalidContextType");
} }
/// <summary> /// <summary>
/// The context type '{0}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for. /// The context type '{0}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for.
/// </summary> /// </summary>
internal static string FormatMigrationsEndPointMiddleware_InvalidContextType(object p0) internal static string FormatMigrationsEndPointMiddleware_InvalidContextType(object p0)
{ => string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_InvalidContextType"), p0);
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_InvalidContextType"), p0);
}
/// <summary> /// <summary>
/// No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for. /// No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.
/// </summary> /// </summary>
internal static string MigrationsEndPointMiddleware_NoContextType internal static string MigrationsEndPointMiddleware_NoContextType
{ {
get { return GetString("MigrationsEndPointMiddleware_NoContextType"); } get => GetString("MigrationsEndPointMiddleware_NoContextType");
} }
/// <summary> /// <summary>
/// No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for. /// No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.
/// </summary> /// </summary>
internal static string FormatMigrationsEndPointMiddleware_NoContextType() internal static string FormatMigrationsEndPointMiddleware_NoContextType()
{ => GetString("MigrationsEndPointMiddleware_NoContextType");
return GetString("MigrationsEndPointMiddleware_NoContextType");
}
/// <summary>
/// Request path matched the path configured for this migrations endpoint ({0}). Attempting to process the migrations request.
/// </summary>
internal static string MigrationsEndPointMiddleware_RequestPathMatched
{
get { return GetString("MigrationsEndPointMiddleware_RequestPathMatched"); }
}
/// <summary>
/// Request path matched the path configured for this migrations endpoint ({0}). Attempting to process the migrations request.
/// </summary>
internal static string FormatMigrationsEndPointMiddleware_RequestPathMatched(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_RequestPathMatched"), p0);
}
/// <summary> /// <summary>
/// A database operation failed while processing the request. /// A database operation failed while processing the request.
/// </summary> /// </summary>
internal static string DatabaseErrorPage_Title internal static string DatabaseErrorPage_Title
{ {
get { return GetString("DatabaseErrorPage_Title"); } get => GetString("DatabaseErrorPage_Title");
} }
/// <summary> /// <summary>
/// A database operation failed while processing the request. /// A database operation failed while processing the request.
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_Title() internal static string FormatDatabaseErrorPage_Title()
{ => GetString("DatabaseErrorPage_Title");
return GetString("DatabaseErrorPage_Title");
}
/// <summary>
/// {0} occurred, checking if Entity Framework recorded this exception as resulting from a failed database operation.
/// </summary>
internal static string DatabaseErrorPage_AttemptingToMatchException
{
get { return GetString("DatabaseErrorPage_AttemptingToMatchException"); }
}
/// <summary>
/// {0} occurred, checking if Entity Framework recorded this exception as resulting from a failed database operation.
/// </summary>
internal static string FormatDatabaseErrorPage_AttemptingToMatchException(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("DatabaseErrorPage_AttemptingToMatchException"), p0);
}
/// <summary>
/// Entity Framework recorded that the current exception was due to a failed database operation. Attempting to show database error page.
/// </summary>
internal static string DatabaseErrorPage_Matched
{
get { return GetString("DatabaseErrorPage_Matched"); }
}
/// <summary>
/// Entity Framework recorded that the current exception was due to a failed database operation. Attempting to show database error page.
/// </summary>
internal static string FormatDatabaseErrorPage_Matched()
{
return GetString("DatabaseErrorPage_Matched");
}
/// <summary> /// <summary>
/// Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services. /// Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services.
/// </summary> /// </summary>
internal static string DatabaseErrorPage_NoRecordedException internal static string DatabaseErrorPage_NoRecordedException
{ {
get { return GetString("DatabaseErrorPage_NoRecordedException"); } get => GetString("DatabaseErrorPage_NoRecordedException");
} }
/// <summary> /// <summary>
/// Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services. /// Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services.
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_NoRecordedException() internal static string FormatDatabaseErrorPage_NoRecordedException()
{ => GetString("DatabaseErrorPage_NoRecordedException");
return GetString("DatabaseErrorPage_NoRecordedException");
}
/// <summary>
/// The target data store is not a relational database. Skipping the database error page.
/// </summary>
internal static string DatabaseErrorPage_NotRelationalDatabase
{
get { return GetString("DatabaseErrorPage_NotRelationalDatabase"); }
}
/// <summary>
/// The target data store is not a relational database. Skipping the database error page.
/// </summary>
internal static string FormatDatabaseErrorPage_NotRelationalDatabase()
{
return GetString("DatabaseErrorPage_NotRelationalDatabase");
}
/// <summary>
/// The current exception (and its inner exceptions) do not match the last exception Entity Framework recorded due to a failed database operation. This means the database operation exception was handled and another exception occurred later in the request.
/// </summary>
internal static string DatabaseErrorPage_NoMatch
{
get { return GetString("DatabaseErrorPage_NoMatch"); }
}
/// <summary>
/// The current exception (and its inner exceptions) do not match the last exception Entity Framework recorded due to a failed database operation. This means the database operation exception was handled and another exception occurred later in the request.
/// </summary>
internal static string FormatDatabaseErrorPage_NoMatch()
{
return GetString("DatabaseErrorPage_NoMatch");
}
/// <summary> /// <summary>
/// PM&gt; Add-Migration [migration name] /// PM&gt; Add-Migration [migration name]
/// </summary> /// </summary>
internal static string DatabaseErrorPage_AddMigrationCommandPMC internal static string DatabaseErrorPage_AddMigrationCommandPMC
{ {
get { return GetString("DatabaseErrorPage_AddMigrationCommandPMC"); } get => GetString("DatabaseErrorPage_AddMigrationCommandPMC");
} }
/// <summary> /// <summary>
/// PM&gt; Add-Migration [migration name] /// PM&gt; Add-Migration [migration name]
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_AddMigrationCommandPMC() internal static string FormatDatabaseErrorPage_AddMigrationCommandPMC()
{ => GetString("DatabaseErrorPage_AddMigrationCommandPMC");
return GetString("DatabaseErrorPage_AddMigrationCommandPMC");
}
/// <summary> /// <summary>
/// PM&gt; Update-Database /// PM&gt; Update-Database
/// </summary> /// </summary>
internal static string DatabaseErrorPage_ApplyMigrationsCommandPMC internal static string DatabaseErrorPage_ApplyMigrationsCommandPMC
{ {
get { return GetString("DatabaseErrorPage_ApplyMigrationsCommandPMC"); } get => GetString("DatabaseErrorPage_ApplyMigrationsCommandPMC");
} }
/// <summary> /// <summary>
/// PM&gt; Update-Database /// PM&gt; Update-Database
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_ApplyMigrationsCommandPMC() internal static string FormatDatabaseErrorPage_ApplyMigrationsCommandPMC()
{ => GetString("DatabaseErrorPage_ApplyMigrationsCommandPMC");
return GetString("DatabaseErrorPage_ApplyMigrationsCommandPMC");
}
/// <summary> /// <summary>
/// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory: /// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_NoDbOrMigrationsInfoCLI internal static string DatabaseErrorPage_NoDbOrMigrationsInfoCLI
{ {
get { return GetString("DatabaseErrorPage_NoDbOrMigrationsInfoCLI"); } get => GetString("DatabaseErrorPage_NoDbOrMigrationsInfoCLI");
} }
/// <summary> /// <summary>
/// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory: /// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_NoDbOrMigrationsInfoCLI() internal static string FormatDatabaseErrorPage_NoDbOrMigrationsInfoCLI()
{ => GetString("DatabaseErrorPage_NoDbOrMigrationsInfoCLI");
return GetString("DatabaseErrorPage_NoDbOrMigrationsInfoCLI");
}
/// <summary> /// <summary>
/// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory: /// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_PendingChangesInfoCLI internal static string DatabaseErrorPage_PendingChangesInfoCLI
{ {
get { return GetString("DatabaseErrorPage_PendingChangesInfoCLI"); } get => GetString("DatabaseErrorPage_PendingChangesInfoCLI");
} }
/// <summary> /// <summary>
/// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory: /// Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_PendingChangesInfoCLI() internal static string FormatDatabaseErrorPage_PendingChangesInfoCLI()
{ => GetString("DatabaseErrorPage_PendingChangesInfoCLI");
return GetString("DatabaseErrorPage_PendingChangesInfoCLI");
}
/// <summary> /// <summary>
/// Alternatively, you can apply pending migrations from a command prompt at your project directory: /// Alternatively, you can apply pending migrations from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string DatabaseErrorPage_HowToApplyFromCLI internal static string DatabaseErrorPage_HowToApplyFromCLI
{ {
get { return GetString("DatabaseErrorPage_HowToApplyFromCLI"); } get => GetString("DatabaseErrorPage_HowToApplyFromCLI");
} }
/// <summary> /// <summary>
/// Alternatively, you can apply pending migrations from a command prompt at your project directory: /// Alternatively, you can apply pending migrations from a command prompt at your project directory:
/// </summary> /// </summary>
internal static string FormatDatabaseErrorPage_HowToApplyFromCLI() internal static string FormatDatabaseErrorPage_HowToApplyFromCLI()
{ => GetString("DatabaseErrorPage_HowToApplyFromCLI");
return GetString("DatabaseErrorPage_HowToApplyFromCLI");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="DatabaseErrorPageMiddleware_ContextNotRegistered" xml:space="preserve"> <data name="DatabaseErrorPageMiddleware_ContextNotRegistered" xml:space="preserve">
<value>The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page.</value> <value>The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;&gt;() inside the UseServices(...) call in your application startup code. Skipping display of the database error page.</value>
</data> </data>
<data name="DatabaseErrorPageMiddleware_Exception" xml:space="preserve"> <data name="DatabaseErrorPageMiddleware_Exception" xml:space="preserve">
<value>An exception occurred while calculating the database error page content. Skipping display of the database error page.</value> <value>An exception occurred while calculating the database error page content. Skipping display of the database error page.</value>
@ -165,12 +165,6 @@
<data name="DatabaseErrorPage_ApplyMigrationsCommandCLI" xml:space="preserve"> <data name="DatabaseErrorPage_ApplyMigrationsCommandCLI" xml:space="preserve">
<value>&gt; dotnet ef database update</value> <value>&gt; dotnet ef database update</value>
</data> </data>
<data name="MigrationsEndPointMiddleware_Applied" xml:space="preserve">
<value>Migrations successfully applied for context '{0}'.</value>
</data>
<data name="MigrationsEndPointMiddleware_ApplyingMigrations" xml:space="preserve">
<value>Request is valid, applying migrations for context '{0}'.</value>
</data>
<data name="MigrationsEndPointMiddleware_ContextNotRegistered" xml:space="preserve"> <data name="MigrationsEndPointMiddleware_ContextNotRegistered" xml:space="preserve">
<value>The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code.</value> <value>The context type '{0}' was not found in services. This usually means the context was not registered in services during startup. You probably want to call AddScoped&lt;{0}&gt;() inside the UseServices(...) call in your application startup code.</value>
</data> </data>
@ -183,27 +177,12 @@
<data name="MigrationsEndPointMiddleware_NoContextType" xml:space="preserve"> <data name="MigrationsEndPointMiddleware_NoContextType" xml:space="preserve">
<value>No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.</value> <value>No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.</value>
</data> </data>
<data name="MigrationsEndPointMiddleware_RequestPathMatched" xml:space="preserve">
<value>Request path matched the path configured for this migrations endpoint ({0}). Attempting to process the migrations request.</value>
</data>
<data name="DatabaseErrorPage_Title" xml:space="preserve"> <data name="DatabaseErrorPage_Title" xml:space="preserve">
<value>A database operation failed while processing the request.</value> <value>A database operation failed while processing the request.</value>
</data> </data>
<data name="DatabaseErrorPage_AttemptingToMatchException" xml:space="preserve">
<value>{0} occurred, checking if Entity Framework recorded this exception as resulting from a failed database operation.</value>
</data>
<data name="DatabaseErrorPage_Matched" xml:space="preserve">
<value>Entity Framework recorded that the current exception was due to a failed database operation. Attempting to show database error page.</value>
</data>
<data name="DatabaseErrorPage_NoRecordedException" xml:space="preserve"> <data name="DatabaseErrorPage_NoRecordedException" xml:space="preserve">
<value>Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services.</value> <value>Entity Framework did not record any exceptions due to failed database operations. This means the current exception is not a failed Entity Framework database operation, or the current exception occurred from a DbContext that was not obtained from request services.</value>
</data> </data>
<data name="DatabaseErrorPage_NotRelationalDatabase" xml:space="preserve">
<value>The target data store is not a relational database. Skipping the database error page.</value>
</data>
<data name="DatabaseErrorPage_NoMatch" xml:space="preserve">
<value>The current exception (and its inner exceptions) do not match the last exception Entity Framework recorded due to a failed database operation. This means the database operation exception was handled and another exception occurred later in the request.</value>
</data>
<data name="DatabaseErrorPage_AddMigrationCommandPMC" xml:space="preserve"> <data name="DatabaseErrorPage_AddMigrationCommandPMC" xml:space="preserve">
<value>PM&gt; Add-Migration [migration name]</value> <value>PM&gt; Add-Migration [migration name]</value>
</data> </data>

View File

@ -4,9 +4,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.Internal;
using Microsoft.AspNetCore.Diagnostics.RazorViews; using Microsoft.AspNetCore.Diagnostics.RazorViews;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Diagnostics
IOptions<DeveloperExceptionPageOptions> options, IOptions<DeveloperExceptionPageOptions> options,
ILoggerFactory loggerFactory, ILoggerFactory loggerFactory,
IHostingEnvironment hostingEnvironment, IHostingEnvironment hostingEnvironment,
System.Diagnostics.DiagnosticSource diagnosticSource) DiagnosticSource diagnosticSource)
{ {
if (next == null) if (next == null)
{ {
@ -75,11 +75,11 @@ namespace Microsoft.AspNetCore.Diagnostics
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(0, ex, "An unhandled exception has occurred while executing the request"); _logger.UnhandledException(ex);
if (context.Response.HasStarted) if (context.Response.HasStarted)
{ {
_logger.LogWarning("The response has already started, the error page middleware will not be executed."); _logger.ResponseStartedErrorPageMiddleware();
throw; throw;
} }
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.Diagnostics
catch (Exception ex2) catch (Exception ex2)
{ {
// If there's a Exception while generating the error page, re-throw the original exception. // If there's a Exception while generating the error page, re-throw the original exception.
_logger.LogError(0, ex2, "An exception was thrown attempting to display the error page."); _logger.DisplayErrorPageException(ex2);
} }
throw; throw;
} }

View File

@ -5,6 +5,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.Internal;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -45,11 +46,11 @@ namespace Microsoft.AspNetCore.Diagnostics
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(0, ex, "An unhandled exception has occurred: " + ex.Message); _logger.UnhandledException(ex);
// We can't do anything if the response has already started, just abort. // We can't do anything if the response has already started, just abort.
if (context.Response.HasStarted) if (context.Response.HasStarted)
{ {
_logger.LogWarning("The response has already started, the error handler will not be executed."); _logger.ResponseStartedErrorHandler();
throw; throw;
} }
@ -84,7 +85,7 @@ namespace Microsoft.AspNetCore.Diagnostics
catch (Exception ex2) catch (Exception ex2)
{ {
// Suppress secondary exceptions, re-throw the original. // Suppress secondary exceptions, re-throw the original.
_logger.LogError(0, ex2, "An exception was thrown attempting to execute the error handler."); _logger.ErrorHandlerException(ex2);
} }
finally finally
{ {

View File

@ -0,0 +1,54 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Diagnostics.Internal
{
internal static class DiagnosticsLoggerExtensions
{
// ExceptionHandlerMiddleware & DeveloperExceptionPageMiddleware
private static readonly Action<ILogger, Exception> _unhandledException =
LoggerMessage.Define(LogLevel.Error, new EventId(1, "UnhandledException"), "An unhandled exception has occurred while executing the request.");
// ExceptionHandlerMiddleware
private static readonly Action<ILogger, Exception> _responseStartedErrorHandler =
LoggerMessage.Define(LogLevel.Warning, new EventId(2, "ResponseStarted"), "The response has already started, the error handler will not be executed.");
private static readonly Action<ILogger, Exception> _errorHandlerException =
LoggerMessage.Define(LogLevel.Error, new EventId(3, "Exception"), "An exception was thrown attempting to execute the error handler.");
// DeveloperExceptionPageMiddleware
private static readonly Action<ILogger, Exception> _responseStartedErrorPageMiddleware =
LoggerMessage.Define(LogLevel.Warning, new EventId(2, "ResponseStarted"), "The response has already started, the error page middleware will not be executed.");
private static readonly Action<ILogger, Exception> _displayErrorPageException =
LoggerMessage.Define(LogLevel.Error, new EventId(3, "DisplayErrorPageException"), "An exception was thrown attempting to display the error page.");
public static void UnhandledException(this ILogger logger, Exception exception)
{
_unhandledException(logger, exception);
}
public static void ResponseStartedErrorHandler(this ILogger logger)
{
_responseStartedErrorHandler(logger, null);
}
public static void ErrorHandlerException(this ILogger logger, Exception exception)
{
_errorHandlerException(logger, exception);
}
public static void ResponseStartedErrorPageMiddleware(this ILogger logger)
{
_responseStartedErrorPageMiddleware(logger, null);
}
public static void DisplayErrorPageException(this ILogger logger, Exception exception)
{
_displayErrorPageException(logger, exception);
}
}
}

View File

@ -15,656 +15,574 @@ namespace Microsoft.AspNetCore.Diagnostics
/// </summary> /// </summary>
internal static string DiagnosticsPageHtml_Information internal static string DiagnosticsPageHtml_Information
{ {
get { return GetString("DiagnosticsPageHtml_Information"); } get => GetString("DiagnosticsPageHtml_Information");
} }
/// <summary> /// <summary>
/// You are seeing this page because DiagnosticsPageMiddleware was added to your web application. /// You are seeing this page because DiagnosticsPageMiddleware was added to your web application.
/// </summary> /// </summary>
internal static string FormatDiagnosticsPageHtml_Information() internal static string FormatDiagnosticsPageHtml_Information()
{ => GetString("DiagnosticsPageHtml_Information");
return GetString("DiagnosticsPageHtml_Information");
}
/// <summary> /// <summary>
/// Test Error Message /// Test Error Message
/// </summary> /// </summary>
internal static string DiagnosticsPageHtml_TestErrorMessage internal static string DiagnosticsPageHtml_TestErrorMessage
{ {
get { return GetString("DiagnosticsPageHtml_TestErrorMessage"); } get => GetString("DiagnosticsPageHtml_TestErrorMessage");
} }
/// <summary> /// <summary>
/// Test Error Message /// Test Error Message
/// </summary> /// </summary>
internal static string FormatDiagnosticsPageHtml_TestErrorMessage() internal static string FormatDiagnosticsPageHtml_TestErrorMessage()
{ => GetString("DiagnosticsPageHtml_TestErrorMessage");
return GetString("DiagnosticsPageHtml_TestErrorMessage");
}
/// <summary> /// <summary>
/// Test Error Page /// Test Error Page
/// </summary> /// </summary>
internal static string DiagnosticsPageHtml_TestErrorSection internal static string DiagnosticsPageHtml_TestErrorSection
{ {
get { return GetString("DiagnosticsPageHtml_TestErrorSection"); } get => GetString("DiagnosticsPageHtml_TestErrorSection");
} }
/// <summary> /// <summary>
/// Test Error Page /// Test Error Page
/// </summary> /// </summary>
internal static string FormatDiagnosticsPageHtml_TestErrorSection() internal static string FormatDiagnosticsPageHtml_TestErrorSection()
{ => GetString("DiagnosticsPageHtml_TestErrorSection");
return GetString("DiagnosticsPageHtml_TestErrorSection");
}
/// <summary> /// <summary>
/// Diagnostics Page /// Diagnostics Page
/// </summary> /// </summary>
internal static string DiagnosticsPageHtml_Title internal static string DiagnosticsPageHtml_Title
{ {
get { return GetString("DiagnosticsPageHtml_Title"); } get => GetString("DiagnosticsPageHtml_Title");
} }
/// <summary> /// <summary>
/// Diagnostics Page /// Diagnostics Page
/// </summary> /// </summary>
internal static string FormatDiagnosticsPageHtml_Title() internal static string FormatDiagnosticsPageHtml_Title()
{ => GetString("DiagnosticsPageHtml_Title");
return GetString("DiagnosticsPageHtml_Title");
}
/// <summary> /// <summary>
/// Cookies /// Cookies
/// </summary> /// </summary>
internal static string ErrorPageHtml_CookiesButton internal static string ErrorPageHtml_CookiesButton
{ {
get { return GetString("ErrorPageHtml_CookiesButton"); } get => GetString("ErrorPageHtml_CookiesButton");
} }
/// <summary> /// <summary>
/// Cookies /// Cookies
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_CookiesButton() internal static string FormatErrorPageHtml_CookiesButton()
{ => GetString("ErrorPageHtml_CookiesButton");
return GetString("ErrorPageHtml_CookiesButton");
}
/// <summary> /// <summary>
/// Headers /// Headers
/// </summary> /// </summary>
internal static string ErrorPageHtml_HeadersButton internal static string ErrorPageHtml_HeadersButton
{ {
get { return GetString("ErrorPageHtml_HeadersButton"); } get => GetString("ErrorPageHtml_HeadersButton");
} }
/// <summary> /// <summary>
/// Headers /// Headers
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_HeadersButton() internal static string FormatErrorPageHtml_HeadersButton()
{ => GetString("ErrorPageHtml_HeadersButton");
return GetString("ErrorPageHtml_HeadersButton");
}
/// <summary> /// <summary>
/// No cookie data. /// No cookie data.
/// </summary> /// </summary>
internal static string ErrorPageHtml_NoCookieData internal static string ErrorPageHtml_NoCookieData
{ {
get { return GetString("ErrorPageHtml_NoCookieData"); } get => GetString("ErrorPageHtml_NoCookieData");
} }
/// <summary> /// <summary>
/// No cookie data. /// No cookie data.
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_NoCookieData() internal static string FormatErrorPageHtml_NoCookieData()
{ => GetString("ErrorPageHtml_NoCookieData");
return GetString("ErrorPageHtml_NoCookieData");
}
/// <summary> /// <summary>
/// No header data. /// No header data.
/// </summary> /// </summary>
internal static string ErrorPageHtml_NoHeaderData internal static string ErrorPageHtml_NoHeaderData
{ {
get { return GetString("ErrorPageHtml_NoHeaderData"); } get => GetString("ErrorPageHtml_NoHeaderData");
} }
/// <summary> /// <summary>
/// No header data. /// No header data.
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_NoHeaderData() internal static string FormatErrorPageHtml_NoHeaderData()
{ => GetString("ErrorPageHtml_NoHeaderData");
return GetString("ErrorPageHtml_NoHeaderData");
}
/// <summary> /// <summary>
/// No QueryString data. /// No QueryString data.
/// </summary> /// </summary>
internal static string ErrorPageHtml_NoQueryStringData internal static string ErrorPageHtml_NoQueryStringData
{ {
get { return GetString("ErrorPageHtml_NoQueryStringData"); } get => GetString("ErrorPageHtml_NoQueryStringData");
} }
/// <summary> /// <summary>
/// No QueryString data. /// No QueryString data.
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_NoQueryStringData() internal static string FormatErrorPageHtml_NoQueryStringData()
{ => GetString("ErrorPageHtml_NoQueryStringData");
return GetString("ErrorPageHtml_NoQueryStringData");
}
/// <summary> /// <summary>
/// Query /// Query
/// </summary> /// </summary>
internal static string ErrorPageHtml_QueryButton internal static string ErrorPageHtml_QueryButton
{ {
get { return GetString("ErrorPageHtml_QueryButton"); } get => GetString("ErrorPageHtml_QueryButton");
} }
/// <summary> /// <summary>
/// Query /// Query
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_QueryButton() internal static string FormatErrorPageHtml_QueryButton()
{ => GetString("ErrorPageHtml_QueryButton");
return GetString("ErrorPageHtml_QueryButton");
}
/// <summary> /// <summary>
/// Stack /// Stack
/// </summary> /// </summary>
internal static string ErrorPageHtml_StackButton internal static string ErrorPageHtml_StackButton
{ {
get { return GetString("ErrorPageHtml_StackButton"); } get => GetString("ErrorPageHtml_StackButton");
} }
/// <summary> /// <summary>
/// Stack /// Stack
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_StackButton() internal static string FormatErrorPageHtml_StackButton()
{ => GetString("ErrorPageHtml_StackButton");
return GetString("ErrorPageHtml_StackButton");
}
/// <summary> /// <summary>
/// Internal Server Error /// Internal Server Error
/// </summary> /// </summary>
internal static string ErrorPageHtml_Title internal static string ErrorPageHtml_Title
{ {
get { return GetString("ErrorPageHtml_Title"); } get => GetString("ErrorPageHtml_Title");
} }
/// <summary> /// <summary>
/// Internal Server Error /// Internal Server Error
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_Title() internal static string FormatErrorPageHtml_Title()
{ => GetString("ErrorPageHtml_Title");
return GetString("ErrorPageHtml_Title");
}
/// <summary> /// <summary>
/// An unhandled exception occurred while processing the request. /// An unhandled exception occurred while processing the request.
/// </summary> /// </summary>
internal static string ErrorPageHtml_UnhandledException internal static string ErrorPageHtml_UnhandledException
{ {
get { return GetString("ErrorPageHtml_UnhandledException"); } get => GetString("ErrorPageHtml_UnhandledException");
} }
/// <summary> /// <summary>
/// An unhandled exception occurred while processing the request. /// An unhandled exception occurred while processing the request.
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_UnhandledException() internal static string FormatErrorPageHtml_UnhandledException()
{ => GetString("ErrorPageHtml_UnhandledException");
return GetString("ErrorPageHtml_UnhandledException");
}
/// <summary> /// <summary>
/// Unknown location /// Unknown location
/// </summary> /// </summary>
internal static string ErrorPageHtml_UnknownLocation internal static string ErrorPageHtml_UnknownLocation
{ {
get { return GetString("ErrorPageHtml_UnknownLocation"); } get => GetString("ErrorPageHtml_UnknownLocation");
} }
/// <summary> /// <summary>
/// Unknown location /// Unknown location
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_UnknownLocation() internal static string FormatErrorPageHtml_UnknownLocation()
{ => GetString("ErrorPageHtml_UnknownLocation");
return GetString("ErrorPageHtml_UnknownLocation");
}
/// <summary> /// <summary>
/// Value /// Value
/// </summary> /// </summary>
internal static string ErrorPageHtml_ValueColumn internal static string ErrorPageHtml_ValueColumn
{ {
get { return GetString("ErrorPageHtml_ValueColumn"); } get => GetString("ErrorPageHtml_ValueColumn");
} }
/// <summary> /// <summary>
/// Value /// Value
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_ValueColumn() internal static string FormatErrorPageHtml_ValueColumn()
{ => GetString("ErrorPageHtml_ValueColumn");
return GetString("ErrorPageHtml_ValueColumn");
}
/// <summary> /// <summary>
/// Variable /// Variable
/// </summary> /// </summary>
internal static string ErrorPageHtml_VariableColumn internal static string ErrorPageHtml_VariableColumn
{ {
get { return GetString("ErrorPageHtml_VariableColumn"); } get => GetString("ErrorPageHtml_VariableColumn");
} }
/// <summary> /// <summary>
/// Variable /// Variable
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_VariableColumn() internal static string FormatErrorPageHtml_VariableColumn()
{ => GetString("ErrorPageHtml_VariableColumn");
return GetString("ErrorPageHtml_VariableColumn");
}
/// <summary> /// <summary>
/// The path must start with a '/'. /// The path must start with a '/'.
/// </summary> /// </summary>
internal static string Exception_PathMustStartWithSlash internal static string Exception_PathMustStartWithSlash
{ {
get { return GetString("Exception_PathMustStartWithSlash"); } get => GetString("Exception_PathMustStartWithSlash");
} }
/// <summary> /// <summary>
/// The path must start with a '/'. /// The path must start with a '/'.
/// </summary> /// </summary>
internal static string FormatException_PathMustStartWithSlash() internal static string FormatException_PathMustStartWithSlash()
{ => GetString("Exception_PathMustStartWithSlash");
return GetString("Exception_PathMustStartWithSlash");
}
/// <summary> /// <summary>
/// Name /// Name
/// </summary> /// </summary>
internal static string RuntimeInfoPage_PackageNameColumnName internal static string RuntimeInfoPage_PackageNameColumnName
{ {
get { return GetString("RuntimeInfoPage_PackageNameColumnName"); } get => GetString("RuntimeInfoPage_PackageNameColumnName");
} }
/// <summary> /// <summary>
/// Name /// Name
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_PackageNameColumnName() internal static string FormatRuntimeInfoPage_PackageNameColumnName()
{ => GetString("RuntimeInfoPage_PackageNameColumnName");
return GetString("RuntimeInfoPage_PackageNameColumnName");
}
/// <summary> /// <summary>
/// Path /// Path
/// </summary> /// </summary>
internal static string RuntimeInfoPage_PackagePathColumnName internal static string RuntimeInfoPage_PackagePathColumnName
{ {
get { return GetString("RuntimeInfoPage_PackagePathColumnName"); } get => GetString("RuntimeInfoPage_PackagePathColumnName");
} }
/// <summary> /// <summary>
/// Path /// Path
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_PackagePathColumnName() internal static string FormatRuntimeInfoPage_PackagePathColumnName()
{ => GetString("RuntimeInfoPage_PackagePathColumnName");
return GetString("RuntimeInfoPage_PackagePathColumnName");
}
/// <summary> /// <summary>
/// Packages: /// Packages:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_Packages internal static string RuntimeInfoPage_Packages
{ {
get { return GetString("RuntimeInfoPage_Packages"); } get => GetString("RuntimeInfoPage_Packages");
} }
/// <summary> /// <summary>
/// Packages: /// Packages:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_Packages() internal static string FormatRuntimeInfoPage_Packages()
{ => GetString("RuntimeInfoPage_Packages");
return GetString("RuntimeInfoPage_Packages");
}
/// <summary> /// <summary>
/// Could not retrieve the list of loaded packages. /// Could not retrieve the list of loaded packages.
/// </summary> /// </summary>
internal static string RuntimeInfoPage_PackagesFail internal static string RuntimeInfoPage_PackagesFail
{ {
get { return GetString("RuntimeInfoPage_PackagesFail"); } get => GetString("RuntimeInfoPage_PackagesFail");
} }
/// <summary> /// <summary>
/// Could not retrieve the list of loaded packages. /// Could not retrieve the list of loaded packages.
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_PackagesFail() internal static string FormatRuntimeInfoPage_PackagesFail()
{ => GetString("RuntimeInfoPage_PackagesFail");
return GetString("RuntimeInfoPage_PackagesFail");
}
/// <summary> /// <summary>
/// Version /// Version
/// </summary> /// </summary>
internal static string RuntimeInfoPage_PackageVersionColumnName internal static string RuntimeInfoPage_PackageVersionColumnName
{ {
get { return GetString("RuntimeInfoPage_PackageVersionColumnName"); } get => GetString("RuntimeInfoPage_PackageVersionColumnName");
} }
/// <summary> /// <summary>
/// Version /// Version
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_PackageVersionColumnName() internal static string FormatRuntimeInfoPage_PackageVersionColumnName()
{ => GetString("RuntimeInfoPage_PackageVersionColumnName");
return GetString("RuntimeInfoPage_PackageVersionColumnName");
}
/// <summary> /// <summary>
/// Runtime Version: /// Runtime Version:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeVersion internal static string RuntimeInfoPage_RuntimeVersion
{ {
get { return GetString("RuntimeInfoPage_RuntimeVersion"); } get => GetString("RuntimeInfoPage_RuntimeVersion");
} }
/// <summary> /// <summary>
/// Runtime Version: /// Runtime Version:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeVersion() internal static string FormatRuntimeInfoPage_RuntimeVersion()
{ => GetString("RuntimeInfoPage_RuntimeVersion");
return GetString("RuntimeInfoPage_RuntimeVersion");
}
/// <summary> /// <summary>
/// Could not determine the runtime version. /// Could not determine the runtime version.
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeVersionFail internal static string RuntimeInfoPage_RuntimeVersionFail
{ {
get { return GetString("RuntimeInfoPage_RuntimeVersionFail"); } get => GetString("RuntimeInfoPage_RuntimeVersionFail");
} }
/// <summary> /// <summary>
/// Could not determine the runtime version. /// Could not determine the runtime version.
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeVersionFail() internal static string FormatRuntimeInfoPage_RuntimeVersionFail()
{ => GetString("RuntimeInfoPage_RuntimeVersionFail");
return GetString("RuntimeInfoPage_RuntimeVersionFail");
}
/// <summary> /// <summary>
/// Runtime Information /// Runtime Information
/// </summary> /// </summary>
internal static string RuntimeInfoPage_Title internal static string RuntimeInfoPage_Title
{ {
get { return GetString("RuntimeInfoPage_Title"); } get => GetString("RuntimeInfoPage_Title");
} }
/// <summary> /// <summary>
/// Runtime Information /// Runtime Information
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_Title() internal static string FormatRuntimeInfoPage_Title()
{ => GetString("RuntimeInfoPage_Title");
return GetString("RuntimeInfoPage_Title");
}
/// <summary> /// <summary>
/// Welcome /// Welcome
/// </summary> /// </summary>
internal static string WelcomeHeader internal static string WelcomeHeader
{ {
get { return GetString("WelcomeHeader"); } get => GetString("WelcomeHeader");
} }
/// <summary> /// <summary>
/// Welcome /// Welcome
/// </summary> /// </summary>
internal static string FormatWelcomeHeader() internal static string FormatWelcomeHeader()
{ => GetString("WelcomeHeader");
return GetString("WelcomeHeader");
}
/// <summary> /// <summary>
/// Learn more about the Microsoft ASP.NET Core components /// Learn more about the Microsoft ASP.NET Core components
/// </summary> /// </summary>
internal static string WelcomeLearnMicrosoftAspNet internal static string WelcomeLearnMicrosoftAspNet
{ {
get { return GetString("WelcomeLearnMicrosoftAspNet"); } get => GetString("WelcomeLearnMicrosoftAspNet");
} }
/// <summary> /// <summary>
/// Learn more about the Microsoft ASP.NET Core components /// Learn more about the Microsoft ASP.NET Core components
/// </summary> /// </summary>
internal static string FormatWelcomeLearnMicrosoftAspNet() internal static string FormatWelcomeLearnMicrosoftAspNet()
{ => GetString("WelcomeLearnMicrosoftAspNet");
return GetString("WelcomeLearnMicrosoftAspNet");
}
/// <summary> /// <summary>
/// Browser /// Browser
/// </summary> /// </summary>
internal static string WelcomePageImageText_Browser internal static string WelcomePageImageText_Browser
{ {
get { return GetString("WelcomePageImageText_Browser"); } get => GetString("WelcomePageImageText_Browser");
} }
/// <summary> /// <summary>
/// Browser /// Browser
/// </summary> /// </summary>
internal static string FormatWelcomePageImageText_Browser() internal static string FormatWelcomePageImageText_Browser()
{ => GetString("WelcomePageImageText_Browser");
return GetString("WelcomePageImageText_Browser");
}
/// <summary> /// <summary>
/// Learn More /// Learn More
/// </summary> /// </summary>
internal static string WelcomePageImageText_LearnMore internal static string WelcomePageImageText_LearnMore
{ {
get { return GetString("WelcomePageImageText_LearnMore"); } get => GetString("WelcomePageImageText_LearnMore");
} }
/// <summary> /// <summary>
/// Learn More /// Learn More
/// </summary> /// </summary>
internal static string FormatWelcomePageImageText_LearnMore() internal static string FormatWelcomePageImageText_LearnMore()
{ => GetString("WelcomePageImageText_LearnMore");
return GetString("WelcomePageImageText_LearnMore");
}
/// <summary> /// <summary>
/// Light Bulb /// Light Bulb
/// </summary> /// </summary>
internal static string WelcomePageImageText_LightBulb internal static string WelcomePageImageText_LightBulb
{ {
get { return GetString("WelcomePageImageText_LightBulb"); } get => GetString("WelcomePageImageText_LightBulb");
} }
/// <summary> /// <summary>
/// Light Bulb /// Light Bulb
/// </summary> /// </summary>
internal static string FormatWelcomePageImageText_LightBulb() internal static string FormatWelcomePageImageText_LightBulb()
{ => GetString("WelcomePageImageText_LightBulb");
return GetString("WelcomePageImageText_LightBulb");
}
/// <summary> /// <summary>
/// Skyline /// Skyline
/// </summary> /// </summary>
internal static string WelcomePageImageText_Skyline internal static string WelcomePageImageText_Skyline
{ {
get { return GetString("WelcomePageImageText_Skyline"); } get => GetString("WelcomePageImageText_Skyline");
} }
/// <summary> /// <summary>
/// Skyline /// Skyline
/// </summary> /// </summary>
internal static string FormatWelcomePageImageText_Skyline() internal static string FormatWelcomePageImageText_Skyline()
{ => GetString("WelcomePageImageText_Skyline");
return GetString("WelcomePageImageText_Skyline");
}
/// <summary> /// <summary>
/// Your ASP.NET Core application has been successfully started /// Your ASP.NET Core application has been successfully started
/// </summary> /// </summary>
internal static string WelcomeStarted internal static string WelcomeStarted
{ {
get { return GetString("WelcomeStarted"); } get => GetString("WelcomeStarted");
} }
/// <summary> /// <summary>
/// Your ASP.NET Core application has been successfully started /// Your ASP.NET Core application has been successfully started
/// </summary> /// </summary>
internal static string FormatWelcomeStarted() internal static string FormatWelcomeStarted()
{ => GetString("WelcomeStarted");
return GetString("WelcomeStarted");
}
/// <summary> /// <summary>
/// Your ASP.NET Core application has been successfully started. /// Your ASP.NET Core application has been successfully started.
/// </summary> /// </summary>
internal static string WelcomeTitle internal static string WelcomeTitle
{ {
get { return GetString("WelcomeTitle"); } get => GetString("WelcomeTitle");
} }
/// <summary> /// <summary>
/// Your ASP.NET Core application has been successfully started. /// Your ASP.NET Core application has been successfully started.
/// </summary> /// </summary>
internal static string FormatWelcomeTitle() internal static string FormatWelcomeTitle()
{ => GetString("WelcomeTitle");
return GetString("WelcomeTitle");
}
/// <summary> /// <summary>
/// An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately. /// An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
/// </summary> /// </summary>
internal static string ErrorPageHtml_CompilationException internal static string ErrorPageHtml_CompilationException
{ {
get { return GetString("ErrorPageHtml_CompilationException"); } get => GetString("ErrorPageHtml_CompilationException");
} }
/// <summary> /// <summary>
/// An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately. /// An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
/// </summary> /// </summary>
internal static string FormatErrorPageHtml_CompilationException() internal static string FormatErrorPageHtml_CompilationException()
{ => GetString("ErrorPageHtml_CompilationException");
return GetString("ErrorPageHtml_CompilationException");
}
/// <summary> /// <summary>
/// Operating System: /// Operating System:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_OperatingSystem internal static string RuntimeInfoPage_OperatingSystem
{ {
get { return GetString("RuntimeInfoPage_OperatingSystem"); } get => GetString("RuntimeInfoPage_OperatingSystem");
} }
/// <summary> /// <summary>
/// Operating System: /// Operating System:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_OperatingSystem() internal static string FormatRuntimeInfoPage_OperatingSystem()
{ => GetString("RuntimeInfoPage_OperatingSystem");
return GetString("RuntimeInfoPage_OperatingSystem");
}
/// <summary> /// <summary>
/// Runtime Architecture: /// Runtime Architecture:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeArchitecture internal static string RuntimeInfoPage_RuntimeArchitecture
{ {
get { return GetString("RuntimeInfoPage_RuntimeArchitecture"); } get => GetString("RuntimeInfoPage_RuntimeArchitecture");
} }
/// <summary> /// <summary>
/// Runtime Architecture: /// Runtime Architecture:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeArchitecture() internal static string FormatRuntimeInfoPage_RuntimeArchitecture()
{ => GetString("RuntimeInfoPage_RuntimeArchitecture");
return GetString("RuntimeInfoPage_RuntimeArchitecture");
}
/// <summary> /// <summary>
/// Runtime Type: /// Runtime Type:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeType internal static string RuntimeInfoPage_RuntimeType
{ {
get { return GetString("RuntimeInfoPage_RuntimeType"); } get => GetString("RuntimeInfoPage_RuntimeType");
} }
/// <summary> /// <summary>
/// Runtime Type: /// Runtime Type:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeType() internal static string FormatRuntimeInfoPage_RuntimeType()
{ => GetString("RuntimeInfoPage_RuntimeType");
return GetString("RuntimeInfoPage_RuntimeType");
}
/// <summary> /// <summary>
/// Could not determine the operating system. /// Could not determine the operating system.
/// </summary> /// </summary>
internal static string RuntimeInfoPage_OperatingSystemFail internal static string RuntimeInfoPage_OperatingSystemFail
{ {
get { return GetString("RuntimeInfoPage_OperatingSystemFail"); } get => GetString("RuntimeInfoPage_OperatingSystemFail");
} }
/// <summary> /// <summary>
/// Could not determine the operating system. /// Could not determine the operating system.
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_OperatingSystemFail() internal static string FormatRuntimeInfoPage_OperatingSystemFail()
{ => GetString("RuntimeInfoPage_OperatingSystemFail");
return GetString("RuntimeInfoPage_OperatingSystemFail");
}
/// <summary> /// <summary>
/// Could not determine the runtime architecture. /// Could not determine the runtime architecture.
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeArchitectureFail internal static string RuntimeInfoPage_RuntimeArchitectureFail
{ {
get { return GetString("RuntimeInfoPage_RuntimeArchitectureFail"); } get => GetString("RuntimeInfoPage_RuntimeArchitectureFail");
} }
/// <summary> /// <summary>
/// Could not determine the runtime architecture. /// Could not determine the runtime architecture.
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeArchitectureFail() internal static string FormatRuntimeInfoPage_RuntimeArchitectureFail()
{ => GetString("RuntimeInfoPage_RuntimeArchitectureFail");
return GetString("RuntimeInfoPage_RuntimeArchitectureFail");
}
/// <summary> /// <summary>
/// Could not determine the runtime type. /// Could not determine the runtime type.
/// </summary> /// </summary>
internal static string RuntimeInfoPage_RuntimeTypeFail internal static string RuntimeInfoPage_RuntimeTypeFail
{ {
get { return GetString("RuntimeInfoPage_RuntimeTypeFail"); } get => GetString("RuntimeInfoPage_RuntimeTypeFail");
} }
/// <summary> /// <summary>
/// Could not determine the runtime type. /// Could not determine the runtime type.
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_RuntimeTypeFail() internal static string FormatRuntimeInfoPage_RuntimeTypeFail()
{ => GetString("RuntimeInfoPage_RuntimeTypeFail");
return GetString("RuntimeInfoPage_RuntimeTypeFail");
}
/// <summary> /// <summary>
/// Environment: /// Environment:
/// </summary> /// </summary>
internal static string RuntimeInfoPage_Environment internal static string RuntimeInfoPage_Environment
{ {
get { return GetString("RuntimeInfoPage_Environment"); } get => GetString("RuntimeInfoPage_Environment");
} }
/// <summary> /// <summary>
/// Environment: /// Environment:
/// </summary> /// </summary>
internal static string FormatRuntimeInfoPage_Environment() internal static string FormatRuntimeInfoPage_Environment()
{ => GetString("RuntimeInfoPage_Environment");
return GetString("RuntimeInfoPage_Environment");
}
private static string GetString(string name, params string[] formatterNames) private static string GetString(string name, params string[] formatterNames)
{ {

View File

@ -18,4 +18,8 @@
<PackageReference Include="xunit.runner.visualstudio" /> <PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project> </Project>

View File

@ -28,4 +28,8 @@
<PackageReference Include="xunit.runner.visualstudio" /> <PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project> </Project>