Merge changes from 'release/2.1'
This commit is contained in:
commit
fafae36461
|
|
@ -4,10 +4,7 @@
|
||||||
<!-- MicrosoftNETCoreApp21PackageVersion is assigned at the bottom so it can automatically pick up MicrosoftNETCoreAppPackageVersion in an orchestrated build. -->
|
<!-- MicrosoftNETCoreApp21PackageVersion is assigned at the bottom so it can automatically pick up MicrosoftNETCoreAppPackageVersion in an orchestrated build. -->
|
||||||
<MicrosoftNETCoreAppPackageVersion>2.1.10</MicrosoftNETCoreAppPackageVersion>
|
<MicrosoftNETCoreAppPackageVersion>2.1.10</MicrosoftNETCoreAppPackageVersion>
|
||||||
<MicrosoftNETCoreDotNetAppHostPackageVersion>2.1.10</MicrosoftNETCoreDotNetAppHostPackageVersion>
|
<MicrosoftNETCoreDotNetAppHostPackageVersion>2.1.10</MicrosoftNETCoreDotNetAppHostPackageVersion>
|
||||||
|
|
||||||
<SystemNetHttpWinHttpHandlerPackageVersion>4.5.2</SystemNetHttpWinHttpHandlerPackageVersion>
|
<SystemNetHttpWinHttpHandlerPackageVersion>4.5.2</SystemNetHttpWinHttpHandlerPackageVersion>
|
||||||
|
|
||||||
<MicrosoftExtensionsConfigurationBinderPackageVersion>2.1.1</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
|
<Import Project="$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
|
||||||
|
|
@ -35,6 +32,7 @@
|
||||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.1</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.1</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>2.1.1</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>2.1.1</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>2.1.1</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
|
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>2.1.1</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
|
||||||
|
<MicrosoftExtensionsConfigurationBinderPackageVersion>2.1.10</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.1</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.1</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>2.1.1</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>2.1.1</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>2.1.1</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>2.1.1</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
||||||
|
|
@ -133,9 +131,9 @@
|
||||||
<MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>3.14.2</MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>
|
<MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>3.14.2</MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>
|
||||||
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.2.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
|
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.2.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
|
||||||
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>5.2.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
|
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>5.2.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
|
||||||
<MicrosoftNETCoreApp10PackageVersion>1.0.11</MicrosoftNETCoreApp10PackageVersion>
|
<MicrosoftNETCoreApp10PackageVersion>1.0.15</MicrosoftNETCoreApp10PackageVersion>
|
||||||
<MicrosoftNETCoreApp11PackageVersion>1.1.8</MicrosoftNETCoreApp11PackageVersion>
|
<MicrosoftNETCoreApp11PackageVersion>1.1.12</MicrosoftNETCoreApp11PackageVersion>
|
||||||
<MicrosoftNETCoreApp20PackageVersion>2.0.7</MicrosoftNETCoreApp20PackageVersion>
|
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
||||||
<MicrosoftNETCoreWindowsApiSetsPackageVersion>1.0.1</MicrosoftNETCoreWindowsApiSetsPackageVersion>
|
<MicrosoftNETCoreWindowsApiSetsPackageVersion>1.0.1</MicrosoftNETCoreWindowsApiSetsPackageVersion>
|
||||||
<MicrosoftNETTestSdkPackageVersion>15.9.0</MicrosoftNETTestSdkPackageVersion>
|
<MicrosoftNETTestSdkPackageVersion>15.9.0</MicrosoftNETTestSdkPackageVersion>
|
||||||
<MicrosoftOwinSecurityCookiesPackageVersion>3.0.1</MicrosoftOwinSecurityCookiesPackageVersion>
|
<MicrosoftOwinSecurityCookiesPackageVersion>3.0.1</MicrosoftOwinSecurityCookiesPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Repository Include="Templating" PatchPolicy="AlwaysUpdateAndCascadeVersions" RootPath="$(RepositoryRoot)src\Templating\" />
|
<Repository Include="Templating" PatchPolicy="AlwaysUpdateAndCascadeVersions" RootPath="$(RepositoryRoot)src\Templating\" />
|
||||||
<ShippedRepository Include="EntityFrameworkCore" />
|
<Repository Include="EntityFrameworkCore" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ Later on, this will be checked using this condition:
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.1.11' ">
|
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.1.11' ">
|
||||||
<PackagesInPatch>
|
<PackagesInPatch>
|
||||||
|
Microsoft.AspNetCore.Mvc.Core;
|
||||||
|
Microsoft.AspNetCore.Mvc.RazorPages;
|
||||||
Microsoft.AspNetCore.SignalR.Protocols.MessagePack;
|
Microsoft.AspNetCore.SignalR.Protocols.MessagePack;
|
||||||
Microsoft.AspNetCore.SignalR.Redis;
|
Microsoft.AspNetCore.SignalR.Redis;
|
||||||
</PackagesInPatch>
|
</PackagesInPatch>
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 80a5f9259776c41f30e5a63e3c9fdd240ce3be2d
|
Subproject commit e8f2f1ef030701048cd47898a7d7d70a58342ba4
|
||||||
|
|
@ -32,6 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency;
|
private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency;
|
||||||
|
|
||||||
private static readonly Action<ILogger, string, string, Exception> _actionExecuting;
|
private static readonly Action<ILogger, string, string, Exception> _actionExecuting;
|
||||||
|
private static readonly Action<ILogger, string, MethodInfo, string, string, Exception> _controllerActionExecuting;
|
||||||
private static readonly Action<ILogger, string, double, Exception> _actionExecuted;
|
private static readonly Action<ILogger, string, double, Exception> _actionExecuted;
|
||||||
|
|
||||||
private static readonly Action<ILogger, string[], Exception> _challengeResultExecuting;
|
private static readonly Action<ILogger, string[], Exception> _challengeResultExecuting;
|
||||||
|
|
@ -39,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
private static readonly Action<ILogger, string, Exception> _contentResultExecuting;
|
private static readonly Action<ILogger, string, Exception> _contentResultExecuting;
|
||||||
|
|
||||||
private static readonly Action<ILogger, string, ModelValidationState, Exception> _actionMethodExecuting;
|
private static readonly Action<ILogger, string, ModelValidationState, Exception> _actionMethodExecuting;
|
||||||
private static readonly Action<ILogger, string, string[], ModelValidationState, Exception> _actionMethodExecutingWithArguments;
|
private static readonly Action<ILogger, string, string[], Exception> _actionMethodExecutingWithArguments;
|
||||||
private static readonly Action<ILogger, string, string, double, Exception> _actionMethodExecuted;
|
private static readonly Action<ILogger, string, string, double, Exception> _actionMethodExecuted;
|
||||||
|
|
||||||
private static readonly Action<ILogger, string, string[], Exception> _logFilterExecutionPlan;
|
private static readonly Action<ILogger, string, string[], Exception> _logFilterExecutionPlan;
|
||||||
|
|
@ -153,6 +154,11 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
1,
|
1,
|
||||||
"Route matched with {RouteData}. Executing action {ActionName}");
|
"Route matched with {RouteData}. Executing action {ActionName}");
|
||||||
|
|
||||||
|
_controllerActionExecuting = LoggerMessage.Define<string, MethodInfo, string, string>(
|
||||||
|
LogLevel.Information,
|
||||||
|
3,
|
||||||
|
"Route matched with {RouteData}. Executing controller action with signature {MethodInfo} on controller {Controller} ({AssemblyName}).");
|
||||||
|
|
||||||
_actionExecuted = LoggerMessage.Define<string, double>(
|
_actionExecuted = LoggerMessage.Define<string, double>(
|
||||||
LogLevel.Information,
|
LogLevel.Information,
|
||||||
2,
|
2,
|
||||||
|
|
@ -173,10 +179,10 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
1,
|
1,
|
||||||
"Executing action method {ActionName} - Validation state: {ValidationState}");
|
"Executing action method {ActionName} - Validation state: {ValidationState}");
|
||||||
|
|
||||||
_actionMethodExecutingWithArguments = LoggerMessage.Define<string, string[], ModelValidationState>(
|
_actionMethodExecutingWithArguments = LoggerMessage.Define<string, string[]>(
|
||||||
LogLevel.Information,
|
LogLevel.Trace,
|
||||||
1,
|
3,
|
||||||
"Executing action method {ActionName} with arguments ({Arguments}) - Validation state: {ValidationState}");
|
"Executing action method {ActionName} with arguments ({Arguments})");
|
||||||
|
|
||||||
_actionMethodExecuted = LoggerMessage.Define<string, string, double>(
|
_actionMethodExecuted = LoggerMessage.Define<string, string, double>(
|
||||||
LogLevel.Information,
|
LogLevel.Information,
|
||||||
|
|
@ -683,7 +689,22 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_actionExecuting(logger, stringBuilder.ToString(), action.DisplayName, null);
|
if (action is ControllerActionDescriptor controllerActionDescriptor)
|
||||||
|
{
|
||||||
|
var controllerType = controllerActionDescriptor.ControllerTypeInfo.AsType();
|
||||||
|
var controllerName = TypeNameHelper.GetTypeDisplayName(controllerType);
|
||||||
|
_controllerActionExecuting(
|
||||||
|
logger,
|
||||||
|
stringBuilder.ToString(),
|
||||||
|
controllerActionDescriptor.MethodInfo,
|
||||||
|
controllerName,
|
||||||
|
controllerType.Assembly.GetName().Name,
|
||||||
|
null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_actionExecuting(logger, stringBuilder.ToString(), action.DisplayName, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -814,21 +835,17 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
||||||
var actionName = context.ActionDescriptor.DisplayName;
|
var actionName = context.ActionDescriptor.DisplayName;
|
||||||
|
|
||||||
var validationState = context.ModelState.ValidationState;
|
var validationState = context.ModelState.ValidationState;
|
||||||
|
_actionMethodExecuting(logger, actionName, validationState, null);
|
||||||
|
|
||||||
string[] convertedArguments;
|
if (arguments != null && logger.IsEnabled(LogLevel.Trace))
|
||||||
if (arguments == null)
|
|
||||||
{
|
{
|
||||||
_actionMethodExecuting(logger, actionName, validationState, null);
|
var convertedArguments = new string[arguments.Length];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
convertedArguments = new string[arguments.Length];
|
|
||||||
for (var i = 0; i < arguments.Length; i++)
|
for (var i = 0; i < arguments.Length; i++)
|
||||||
{
|
{
|
||||||
convertedArguments[i] = Convert.ToString(arguments[i]);
|
convertedArguments[i] = Convert.ToString(arguments[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
_actionMethodExecutingWithArguments(logger, actionName, convertedArguments, validationState, null);
|
_actionMethodExecutingWithArguments(logger, actionName, convertedArguments, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
|
||||||
{
|
{
|
||||||
public const string PageFilter = "Page Filter";
|
public const string PageFilter = "Page Filter";
|
||||||
|
|
||||||
private static readonly Action<ILogger, string, string[], ModelValidationState, Exception> _handlerMethodExecuting;
|
private static readonly Action<ILogger, string, ModelValidationState, Exception> _handlerMethodExecuting;
|
||||||
|
private static readonly Action<ILogger, string, string[], Exception> _handlerMethodExecutingWithArguments;
|
||||||
private static readonly Action<ILogger, string, string, Exception> _handlerMethodExecuted;
|
private static readonly Action<ILogger, string, string, Exception> _handlerMethodExecuted;
|
||||||
private static readonly Action<ILogger, object, Exception> _pageFilterShortCircuit;
|
private static readonly Action<ILogger, object, Exception> _pageFilterShortCircuit;
|
||||||
private static readonly Action<ILogger, string, string[], Exception> _malformedPageDirective;
|
private static readonly Action<ILogger, string, string[], Exception> _malformedPageDirective;
|
||||||
|
|
@ -28,10 +29,15 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
|
||||||
{
|
{
|
||||||
// These numbers start at 101 intentionally to avoid conflict with the IDs used by ResourceInvoker.
|
// These numbers start at 101 intentionally to avoid conflict with the IDs used by ResourceInvoker.
|
||||||
|
|
||||||
_handlerMethodExecuting = LoggerMessage.Define<string, string[], ModelValidationState>(
|
_handlerMethodExecuting = LoggerMessage.Define<string, ModelValidationState>(
|
||||||
LogLevel.Information,
|
LogLevel.Information,
|
||||||
101,
|
101,
|
||||||
"Executing handler method {HandlerName} with arguments ({Arguments}) - ModelState is {ValidationState}");
|
"Executing handler method {HandlerName} - ModelState is {ValidationState}");
|
||||||
|
|
||||||
|
_handlerMethodExecutingWithArguments = LoggerMessage.Define<string, string[]>(
|
||||||
|
LogLevel.Trace,
|
||||||
|
103,
|
||||||
|
"Executing handler method {HandlerName} with arguments ({Arguments})");
|
||||||
|
|
||||||
_handlerMethodExecuted = LoggerMessage.Define<string, string>(
|
_handlerMethodExecuted = LoggerMessage.Define<string, string>(
|
||||||
LogLevel.Debug,
|
LogLevel.Debug,
|
||||||
|
|
@ -75,23 +81,19 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
|
||||||
{
|
{
|
||||||
var handlerName = handler.MethodInfo.Name;
|
var handlerName = handler.MethodInfo.Name;
|
||||||
|
|
||||||
string[] convertedArguments;
|
var validationState = context.ModelState.ValidationState;
|
||||||
if (arguments == null)
|
_handlerMethodExecuting(logger, handlerName, validationState, null);
|
||||||
|
|
||||||
|
if (arguments != null && logger.IsEnabled(LogLevel.Trace))
|
||||||
{
|
{
|
||||||
convertedArguments = null;
|
var convertedArguments = new string[arguments.Length];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
convertedArguments = new string[arguments.Length];
|
|
||||||
for (var i = 0; i < arguments.Length; i++)
|
for (var i = 0; i < arguments.Length; i++)
|
||||||
{
|
{
|
||||||
convertedArguments[i] = Convert.ToString(arguments[i]);
|
convertedArguments[i] = Convert.ToString(arguments[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_handlerMethodExecutingWithArguments(logger, handlerName, convertedArguments, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
var validationState = context.ModelState.ValidationState;
|
|
||||||
|
|
||||||
_handlerMethodExecuting(logger, handlerName, convertedArguments, validationState, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore
|
||||||
var localAssemblyVersion = AssemblyName.GetAssemblyName(file).Version;
|
var localAssemblyVersion = AssemblyName.GetAssemblyName(file).Version;
|
||||||
var dllName = Path.GetFileName(file);
|
var dllName = Path.GetFileName(file);
|
||||||
Assert.Contains(dllName, nugetAssemblyVersions.Keys);
|
Assert.Contains(dllName, nugetAssemblyVersions.Keys);
|
||||||
Assert.InRange(localAssemblyVersion.CompareTo(nugetAssemblyVersions[dllName]), 0, int.MaxValue);
|
Assert.True(localAssemblyVersion >= nugetAssemblyVersions[dllName], $"Expected {dllName} ({localAssemblyVersion}) to have assembly version >= {nugetAssemblyVersions[dllName]}");
|
||||||
}
|
}
|
||||||
catch (BadImageFormatException) { }
|
catch (BadImageFormatException) { }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue