Skip to content

Commit 6ad2c32

Browse files
committed
Cleanups
1 parent 3bbee37 commit 6ad2c32

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

src/Components/Samples/BlazorUnitedApp/Pages/Index.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
<h1>@Value?.Parameter</h1>
55

6-
<EditForm method="POST" Model="Value?.Parameter">
6+
<EditForm Model="Value?.Parameter">
77
<InputText @bind-Value="Value!.Parameter" />
8-
<AntiforgeryToken />
98
<input type="submit" value="Send" />
109
</EditForm>
1110

src/Components/Web/src/Forms/AntiforgeryToken.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ public class AntiforgeryToken : IComponent
1919
void IComponent.Attach(RenderHandle renderHandle)
2020
{
2121
_handle = renderHandle;
22-
UpdateToken(Antiforgery.GetAntiforgeryToken());
23-
}
24-
25-
private void UpdateToken(AntiforgeryRequestToken? token)
26-
{
27-
_requestToken = token;
22+
_requestToken = Antiforgery.GetAntiforgeryToken();
2823
}
2924

3025
Task IComponent.SetParametersAsync(ParameterView parameters)

src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using System.Collections.ObjectModel;
65
using System.Net.Http;
76
using Components.TestServer.RazorComponents;
@@ -11,7 +10,6 @@
1110
using OpenQA.Selenium;
1211
using TestServer;
1312
using Xunit.Abstractions;
14-
using static System.Net.WebRequestMethods;
1513

1614
namespace Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.FormHandlingTests;
1715

src/Components/test/testassets/Components.TestServer/RazorComponents/Pages/Forms/DisappearingForm.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@page "/forms/disappears-before-dispatching"
22
@using Components.TestServer.RazorComponents
3+
@using Microsoft.AspNetCore.Components.Forms
34

45
<h2>Form disappears before dispatching</h2>
56

@@ -11,7 +12,7 @@
1112

1213
@* Just here so that the test can dispatch the event. *@
1314
<form method="post" enctype="application/x-www-form-urlencoded" id="test-form">
14-
<Microsoft.AspNetCore.Components.Forms.AntiforgeryToken />
15+
<AntiforgeryToken />
1516
<input id="test-send" type="submit" value="test-send" />
1617
</form>
1718

src/ProjectTemplates/Web.ProjectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).",
1111
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
1212
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).",
13-
"symbols/UseWebAssembly/displayName": "_Use interactive WebAssembly components",
14-
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively in the browser using WebAssembly.",
13+
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components",
14+
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.",
1515
"symbols/UseServer/displayName": "_Use interactive server components",
1616
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.",
1717
"symbols/PWA/displayName": "_Progressive Web Application",

0 commit comments

Comments
 (0)