Skip to content

Commit d85ceda

Browse files
[VMR] Codeflow 426dc1f-426dc1f
[[ commit created by automation ]]
1 parent dbbbad9 commit d85ceda

File tree

83 files changed

+1442
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1442
-400
lines changed

.azure/pipelines/components-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- script: .dotnet/dotnet build ./src/Components/test/E2ETest -c $(BuildConfiguration) --no-restore
6060
displayName: Build
6161
- script: |
62-
set -o pipefail
62+
set -eo pipefail
6363
6464
.dotnet/dotnet test ./src/Components/test/E2ETest \
6565
-c $(BuildConfiguration) \

AspNetCore.slnx

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010
<Project Path="eng/tools/BaselineGenerator/BaselineGenerator.csproj" />
1111
<Project Path="eng/tools/RepoTasks/RepoTasks.csproj" />
1212
</Folder>
13-
<Folder Name="/Interop/" />
14-
<Folder Name="/Interop/test/">
15-
<Project Path="src/Grpc/Interop/test/InteropTests/InteropTests.csproj" />
16-
</Folder>
17-
<Folder Name="/Interop/test/testassets/">
18-
<Project Path="src/Grpc/Interop/test/testassets/InteropClient/InteropClient.csproj" />
19-
<Project Path="src/Grpc/Interop/test/testassets/InteropWebsite/InteropWebsite.csproj" />
20-
</Folder>
2113
<Folder Name="/src/" />
2214
<Folder Name="/src/Analyzers/" />
2315
<Folder Name="/src/Analyzers/Analyzers/">
@@ -244,6 +236,32 @@
244236
<Build Solution="*|arm64" Project="false" />
245237
</Project>
246238
</Folder>
239+
<Folder Name="/src/Grpc/" />
240+
<Folder Name="/src/Grpc/Interop/" />
241+
<Folder Name="/src/Grpc/Interop/test/">
242+
<Project Path="src/Grpc/Interop/test/InteropTests/InteropTests.csproj" />
243+
</Folder>
244+
<Folder Name="/src/Grpc/Interop/test/testassets/">
245+
<Project Path="src/Grpc/Interop/test/testassets/InteropClient/InteropClient.csproj" />
246+
<Project Path="src/Grpc/Interop/test/testassets/InteropWebsite/InteropWebsite.csproj" />
247+
</Folder>
248+
<Folder Name="/src/Grpc/JsonTranscoding/" />
249+
<Folder Name="/src/Grpc/JsonTranscoding/perf/">
250+
<Project Path="src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj" />
251+
</Folder>
252+
<Folder Name="/src/Grpc/JsonTranscoding/src/">
253+
<Project Path="src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Microsoft.AspNetCore.Grpc.JsonTranscoding.csproj" />
254+
<Project Path="src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.Swagger/Microsoft.AspNetCore.Grpc.Swagger.csproj" />
255+
</Folder>
256+
<Folder Name="/src/Grpc/JsonTranscoding/test/">
257+
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests/Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests.csproj" />
258+
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests/Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests.csproj" />
259+
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.Swagger.Tests/Microsoft.AspNetCore.Grpc.Swagger.Tests.csproj" />
260+
</Folder>
261+
<Folder Name="/src/Grpc/JsonTranscoding/test/testassets/">
262+
<Project Path="src/Grpc/JsonTranscoding/test/testassets/IntegrationTestsWebsite/IntegrationTestsWebsite.csproj" />
263+
<Project Path="src/Grpc/JsonTranscoding/test/testassets/Sandbox/Sandbox.csproj" />
264+
</Folder>
247265
<Folder Name="/src/HealthChecks/" />
248266
<Folder Name="/src/HealthChecks/src/">
249267
<Project Path="src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj" />
@@ -1211,14 +1229,6 @@
12111229
<Project Path="src/DataProtection/samples/KeyManagementSimulator/KeyManagementSimulator.csproj" />
12121230
<Project Path="src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj" />
12131231
<Project Path="src/Framework/AspNetCoreAnalyzers/src/SourceGenerators/Microsoft.AspNetCore.App.SourceGenerators.csproj" />
1214-
<Project Path="src/Grpc/JsonTranscoding/perf/Microsoft.AspNetCore.Grpc.Microbenchmarks/Microsoft.AspNetCore.Grpc.Microbenchmarks.csproj" />
1215-
<Project Path="src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Microsoft.AspNetCore.Grpc.JsonTranscoding.csproj" />
1216-
<Project Path="src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.Swagger/Microsoft.AspNetCore.Grpc.Swagger.csproj" />
1217-
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests/Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests.csproj" />
1218-
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests/Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests.csproj" />
1219-
<Project Path="src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.Swagger.Tests/Microsoft.AspNetCore.Grpc.Swagger.Tests.csproj" />
1220-
<Project Path="src/Grpc/JsonTranscoding/test/testassets/IntegrationTestsWebsite/IntegrationTestsWebsite.csproj" />
1221-
<Project Path="src/Grpc/JsonTranscoding/test/testassets/Sandbox/Sandbox.csproj" />
12221232
<Project Path="src/Html.Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj" />
12231233
<Project Path="src/Http/Http.Results/tools/ResultsOfTGenerator/ResultsOfTGenerator.csproj" />
12241234
<Project Path="src/Identity/samples/IdentitySample.ApiEndpoints/IdentitySample.ApiEndpoints.csproj" />

docs/area-owners.md

Lines changed: 24 additions & 24 deletions
Large diffs are not rendered by default.

eng/SharedFramework.External.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
<ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsVersion)" />
4444
<ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Primitives" Version="$(MicrosoftExtensionsPrimitivesVersion)" />
4545
<ExternalAspNetCoreAppReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlVersion)" />
46-
<ExternalAspNetCoreAppReference Include="System.Threading.AccessControl" Version="$(SystemThreadingAccessControlVersion)" />
4746
<ExternalAspNetCoreAppReference Include="System.Threading.RateLimiting" Version="$(SystemThreadingRateLimitingVersion)" />
4847

4948
<!--

src/Components/Components.slnf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@
154154
"src\\StaticAssets\\src\\Microsoft.AspNetCore.StaticAssets.csproj",
155155
"src\\StaticAssets\\test\\Microsoft.AspNetCore.StaticAssets.Tests.csproj",
156156
"src\\Testing\\src\\Microsoft.AspNetCore.InternalTesting.csproj",
157+
"src\\Validation\\gen\\Microsoft.Extensions.Validation.ValidationsGenerator.csproj",
158+
"src\\Validation\\src\\Microsoft.Extensions.Validation.csproj",
159+
"src\\Validation\\test\\Microsoft.Extensions.Validation.GeneratorTests\\Microsoft.Extensions.Validation.GeneratorTests.csproj",
160+
"src\\Validation\\test\\Microsoft.Extensions.Validation.Tests\\Microsoft.Extensions.Validation.Tests.csproj",
157161
"src\\WebEncoders\\src\\Microsoft.Extensions.WebEncoders.csproj"
158162
]
159163
}
160-
}
164+
}

src/Components/Components/src/NavigationManager.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,14 @@ public event EventHandler<NotFoundEventArgs> OnNotFound
5454

5555
private EventHandler<NotFoundEventArgs>? _notFound;
5656

57-
private static readonly NotFoundEventArgs _notFoundEventArgs = new NotFoundEventArgs();
58-
5957
// For the baseUri it's worth storing as a System.Uri so we can do operations
6058
// on that type. System.Uri gives us access to the original string anyway.
6159
private Uri? _baseUri;
6260

6361
// The URI. Always represented an absolute URI.
6462
private string? _uri;
6563
private bool _isInitialized;
64+
internal string NotFoundPageRoute { get; set; } = string.Empty;
6665

6766
/// <summary>
6867
/// Gets or sets the current base URI. The <see cref="BaseUri" /> is always represented as an absolute URI in string form with trailing slash.
@@ -212,7 +211,7 @@ private void NotFoundCore()
212211
}
213212
else
214213
{
215-
_notFound.Invoke(this, _notFoundEventArgs);
214+
_notFound.Invoke(this, new NotFoundEventArgs(NotFoundPageRoute));
216215
}
217216
}
218217

src/Components/Components/src/PublicAPI.Unshipped.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Microsoft.AspNetCore.Components.NavigationManager.OnNotFound -> System.EventHand
66
Microsoft.AspNetCore.Components.NavigationManager.NotFound() -> void
77
Microsoft.AspNetCore.Components.Routing.IHostEnvironmentNavigationManager.Initialize(string! baseUri, string! uri, System.Func<string!, System.Threading.Tasks.Task!>! onNavigateTo) -> void
88
Microsoft.AspNetCore.Components.Routing.NotFoundEventArgs
9-
Microsoft.AspNetCore.Components.Routing.NotFoundEventArgs.NotFoundEventArgs() -> void
9+
Microsoft.AspNetCore.Components.Routing.NotFoundEventArgs.NotFoundEventArgs(string! url) -> void
10+
Microsoft.AspNetCore.Components.Routing.NotFoundEventArgs.Path.get -> string!
1011
Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager.ComponentStatePersistenceManager(Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager!>! logger, System.IServiceProvider! serviceProvider) -> void
1112
Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager.SetPlatformRenderMode(Microsoft.AspNetCore.Components.IComponentRenderMode! renderMode) -> void
1213
Microsoft.AspNetCore.Components.Infrastructure.RegisterPersistentComponentStateServiceCollectionExtensions

src/Components/Components/src/Routing/NotFoundEventArgs.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ namespace Microsoft.AspNetCore.Components.Routing;
88
/// </summary>
99
public sealed class NotFoundEventArgs : EventArgs
1010
{
11+
/// <summary>
12+
/// Gets the path of NotFoundPage.
13+
/// </summary>
14+
public string Path { get; }
15+
1116
/// <summary>
1217
/// Initializes a new instance of <see cref="NotFoundEventArgs" />.
1318
/// </summary>
14-
public NotFoundEventArgs()
15-
{ }
19+
public NotFoundEventArgs(string url)
20+
{
21+
Path = url;
22+
}
23+
1624
}

src/Components/Components/src/Routing/Router.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ public async Task SetParametersAsync(ParameterView parameters)
155155
throw new InvalidOperationException($"The type {NotFoundPage.FullName} " +
156156
$"does not have a {typeof(RouteAttribute).FullName} applied to it.");
157157
}
158+
159+
var routeAttribute = (RouteAttribute)routeAttributes[0];
160+
if (routeAttribute.Template != null)
161+
{
162+
NavigationManager.NotFoundPageRoute = routeAttribute.Template;
163+
}
158164
}
159165

160166
if (!_onNavigateCalled)

src/Components/Endpoints/src/RazorComponentEndpointInvoker.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ await _renderer.InitializeStandardComponentServicesAsync(
111111
ParameterView.Empty,
112112
waitForQuiescence: result.IsPost || isErrorHandlerOrReExecuted);
113113

114-
bool avoidStartingResponse = hasStatusCodePage && !isReExecuted && context.Response.StatusCode == StatusCodes.Status404NotFound;
115-
if (avoidStartingResponse)
116-
{
117-
// the request is going to be re-executed, we should avoid writing to the response
118-
return;
119-
}
120-
121114
Task quiesceTask;
122115
if (!result.IsPost)
123116
{

0 commit comments

Comments
 (0)