Skip to content

Commit 0908d08

Browse files
authored
Merge pull request #17835 from dotnet/master
Update live with master
2 parents 350da82 + 49b6dde commit 0908d08

12 files changed

Lines changed: 772 additions & 464 deletions

File tree

aspnetcore/fundamentals/localization.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,11 @@ In the preceding code, `SharedResource` is the class corresponding to the resx w
114114

115115
### SupportedCultures and SupportedUICultures
116116

117-
ASP.NET Core allows you to specify two culture values, `SupportedCultures` and `SupportedUICultures`. The [CultureInfo](/dotnet/api/system.globalization.cultureinfo) object for `SupportedCultures` determines the results of culture-dependent functions, such as date, time, number, and currency formatting. `SupportedCultures` also determines the sorting order of text, casing conventions, and string comparisons. See [CultureInfo.CurrentCulture](/dotnet/api/system.stringcomparer.currentculture#System_StringComparer_CurrentCulture) for more info on how the server gets the Culture. The `SupportedUICultures` determines which translates strings (from *.resx* files) are looked up by the [ResourceManager](/dotnet/api/system.resources.resourcemanager). The `ResourceManager` simply looks up culture-specific strings that's determined by `CurrentUICulture`. Every thread in .NET has
118-
`CurrentCulture` and `CurrentUICulture` objects. ASP.NET Core inspects these values when rendering culture-dependent functions. For example, if the current thread's culture is set to "en-US" (English, United States), `DateTime.Now.ToLongDateString()` displays "Thursday, February 18, 2016", but if `CurrentCulture` is set to "es-ES" (Spanish, Spain) the output will be "jueves, 18 de febrero de 2016".
117+
ASP.NET Core allows you to specify two culture values, `SupportedCultures` and `SupportedUICultures`. The [CultureInfo](/dotnet/api/system.globalization.cultureinfo) object for `SupportedCultures` determines the results of culture-dependent functions, such as date, time, number, and currency formatting. `SupportedCultures` also determines the sorting order of text, casing conventions, and string comparisons. See [CultureInfo.CurrentCulture](/dotnet/api/system.stringcomparer.currentculture#System_StringComparer_CurrentCulture) for more info on how the server gets the Culture. The `SupportedUICultures` determines which translated strings (from *.resx* files) are looked up by the [ResourceManager](/dotnet/api/system.resources.resourcemanager). The `ResourceManager` simply looks up culture-specific strings that's determined by `CurrentUICulture`. Every thread in .NET has `CurrentCulture` and `CurrentUICulture` objects. ASP.NET Core inspects these values when rendering culture-dependent functions. For example, if the current thread's culture is set to "en-US" (English, United States), `DateTime.Now.ToLongDateString()` displays "Thursday, February 18, 2016", but if `CurrentCulture` is set to "es-ES" (Spanish, Spain) the output will be "jueves, 18 de febrero de 2016".
119118

120119
## Resource files
121120

122-
A resource file is a useful mechanism for separating localizable strings from code. Translated strings for the non-default language are isolated *.resx* resource files. For example, you might want to create Spanish resource file named *Welcome.es.resx* containing translated strings. "es" is the language code for Spanish. To create this resource file in Visual Studio:
121+
A resource file is a useful mechanism for separating localizable strings from code. Translated strings for the non-default language are isolated in *.resx* resource files. For example, you might want to create Spanish resource file named *Welcome.es.resx* containing translated strings. "es" is the language code for Spanish. To create this resource file in Visual Studio:
123122

124123
1. In **Solution Explorer**, right click on the folder which will contain the resource file > **Add** > **New Item**.
125124

aspnetcore/fundamentals/logging/index.md

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

aspnetcore/host-and-deploy/docker/building-net-docker-images.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ ENTRYPOINT ["dotnet", "aspnetapp.dll"]
257257
* [ASP.NET Core Docker sample](https://github.com/dotnet/dotnet-docker) (The one used in this tutorial.)
258258
* [Configure ASP.NET Core to work with proxy servers and load balancers](/aspnet/core/host-and-deploy/proxy-load-balancer)
259259
* [Working with Visual Studio Docker Tools](https://docs.microsoft.com/aspnet/core/publishing/visual-studio-tools-for-docker)
260-
* [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/nodejs/debugging-recipes#_debug-nodejs-in-docker-containers)
260+
* [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/nodejs/debugging-recipes#_debug-nodejs-in-docker-containers)
261+
* [GC using Docker and small containers](xref:performance/memory#sc)
261262

262263
## Next steps
263264

aspnetcore/host-and-deploy/docker/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Find out how to use the Visual Studio Container Tools extension to deploy an ASP
3434

3535
[Configure ASP.NET Core to work with proxy servers and load balancers](xref:host-and-deploy/proxy-load-balancer)
3636
Additional configuration might be required for apps hosted behind proxy servers and load balancers. Passing requests through a proxy often obscures information about the original request, such as the scheme and client IP. It might be necessary to forwarded some information about the request manually to the app.
37+
38+
[GC using Docker and small containers](xref:performance/memory#sc)
39+
Discusses GC selection with small containers.

aspnetcore/host-and-deploy/docker/visual-studio-tools-for-docker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,4 @@ There may be an expectation for the production or release image to be smaller in
232232
* [Deploy a .NET app in a Windows container to Azure Service Fabric](/azure/service-fabric/service-fabric-host-app-in-a-container)
233233
* [Troubleshoot Visual Studio development with Docker](/azure/vs-azure-tools-docker-troubleshooting-docker-errors)
234234
* [Visual Studio Container Tools GitHub repository](https://github.com/Microsoft/DockerTools)
235+
* [GC using Docker and small containers](xref:performance/memory#sc)

aspnetcore/mvc/views/tag-helpers/built-in/component-tag-helper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: guardrex
44
ms.author: riande
55
description: Learn how to use the ASP.NET Core Component Tag Helper to render Razor components in pages and views.
66
ms.custom: mvc
7-
ms.date: 04/01/2020
7+
ms.date: 04/15/2020
88
no-loc: [Blazor, SignalR]
99
uid: mvc/views/tag-helpers/builtin-th/component-tag-helper
1010
---
@@ -16,7 +16,7 @@ To render a component from a page or view, use the [Component Tag Helper](xref:M
1616

1717
## Prerequisites
1818

19-
Follow the guidance in the *Prepare the app to use components in pages and views* section of the <xref:blazor/integrate-components#prepare-the-app-to-use-components-in-pages-and-views> article.
19+
Follow the guidance in the *Prepare the app to use components in pages and views* section of the <xref:blazor/integrate-components#prepare-the-app> article.
2020

2121
## Component Tag Helper
2222

aspnetcore/performance/memory.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: rick-anderson
44
description: Learn how memory is managed in ASP.NET Core and how the garbage collector (GC) works.
55
ms.author: riande
66
ms.custom: mvc
7-
ms.date: 12/05/2019
7+
ms.date: 4/05/2019
88
uid: performance/memory
99
---
1010

@@ -148,6 +148,12 @@ The differences between this chart and the server version are significant:
148148

149149
On a typical web server environment, CPU usage is more important than memory, therefore the Server GC is better. If memory utilization is high and CPU usage is relatively low, the Workstation GC might be more performant. For example, high density hosting several web apps where memory is scarce.
150150

151+
<a name="sc"></a>
152+
153+
### GC using Docker and small containers
154+
155+
When multiple containerized apps are running on one machine, Workstation GC might be more preformant than Server GC. For more information, see [Running with Server GC in a Small Container](https://devblogs.microsoft.com/dotnet/running-with-server-gc-in-a-small-container-scenario-part-0/) and [Running with Server GC in a Small Container Scenario Part 1 – Hard Limit for the GC Heap](https://devblogs.microsoft.com/dotnet/running-with-server-gc-in-a-small-container-scenario-part-1-hard-limit-for-the-gc-heap/).
156+
151157
### Persistent object references
152158

153159
The GC cannot free objects that are referenced. Objects that are referenced but no longer needed result in a memory leak. If the app frequently allocates objects and fails to free them after they are no longer needed, memory usage will increase over time.

aspnetcore/security/authorization/iauthorizationpolicyprovider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ To use custom policies from an `IAuthorizationPolicyProvider`, you must:
178178
services.AddSingleton<IAuthorizationPolicyProvider, MinimumAgePolicyProvider>();
179179
```
180180

181-
A complete custom `IAuthorizationPolicyProvider` sample is available in the [aspnet/AuthSamples GitHub repository](https://github.com/dotnet/AspNetCore/tree/release/2.2/src/Security/samples/CustomPolicyProvider).
181+
A complete custom `IAuthorizationPolicyProvider` sample is available in the [dotnet/aspnetcore GitHub repository](https://github.com/dotnet/aspnetcore/tree/ea555458dc61e04314598c25b3ab8c56362a5123/src/Security/samples/CustomPolicyProvider).

aspnetcore/security/cors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Enabling CORS on a per-endpoint basis using `RequireCors` currently does ***not*
103103

104104
With endpoint routing, CORS can be enabled on a per-endpoint basis using the <xref:Microsoft.AspNetCore.Builder.CorsEndpointConventionBuilderExtensions.RequireCors*> set of extension methods:
105105

106-
[!code-csharp[](cors/3.1sample/Cors/WebAPI/StartupEndPt.cs?name=snippet2&highlight=3,7-15,32,41,44)]
106+
[!code-csharp[](cors/3.1sample/Cors/WebAPI/StartupEndPt.cs?name=snippet2&highlight=3,7-15,32,40,43)]
107107

108108
In the preceding code:
109109

aspnetcore/signalr/javascript-client.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ SignalR determines which client method to call by matching the method name and a
138138

139139
Chain a `catch` method to the end of the `start` method to handle client-side errors. Use `console.error` to output errors to the browser's console.
140140

141-
[!code-javascript[Error handling](javascript-client/sample/wwwroot/js/chat.js?range=49-51)]
141+
[!code-javascript[Error handling](javascript-client/sample/wwwroot/js/chat.js?range=50)]
142142

143-
Setup client-side log tracing by passing a logger and type of event to log when the connection is made. Messages are logged with the specified log level and higher. Available log levels are as follows:
143+
Set up client-side log tracing by passing a logger and type of event to log when the connection is made. Messages are logged with the specified log level and higher. Available log levels are as follows:
144144

145145
* `signalR.LogLevel.Error` &ndash; Error messages. Logs `Error` messages only.
146146
* `signalR.LogLevel.Warning` &ndash; Warning messages about potential errors. Logs `Warning`, and `Error` messages.
@@ -171,7 +171,7 @@ Without any parameters, `withAutomaticReconnect()` configures the client to wait
171171
Before starting any reconnect attempts, the `HubConnection` will transition to the `HubConnectionState.Reconnecting` state and fire its `onreconnecting` callbacks instead of transitioning to the `Disconnected` state and triggering its `onclose` callbacks like a `HubConnection` without automatic reconnect configured. This provides an opportunity to warn users that the connection has been lost and to disable UI elements.
172172

173173
```javascript
174-
connection.onreconnecting((error) => {
174+
connection.onreconnecting(error => {
175175
console.assert(connection.state === signalR.HubConnectionState.Reconnecting);
176176

177177
document.getElementById("messageInput").disabled = true;
@@ -190,7 +190,7 @@ Since the connection looks entirely new to the server, a new `connectionId` will
190190
> The `onreconnected` callback's `connectionId` parameter will be undefined if the `HubConnection` was configured to [skip negotiation](xref:signalr/configuration#configure-client-options).
191191
192192
```javascript
193-
connection.onreconnected((connectionId) => {
193+
connection.onreconnected(connectionId => {
194194
console.assert(connection.state === signalR.HubConnectionState.Connected);
195195

196196
document.getElementById("messageInput").disabled = false;
@@ -220,7 +220,7 @@ async function start() {
220220
If the client doesn't successfully reconnect within its first four attempts, the `HubConnection` will transition to the `Disconnected` state and fire its [onclose](/javascript/api/%40aspnet/signalr/hubconnection#onclose) callbacks. This provides an opportunity to inform users the connection has been permanently lost and recommend refreshing the page:
221221

222222
```javascript
223-
connection.onclose((error) => {
223+
connection.onclose(error => {
224224
console.assert(connection.state === signalR.HubConnectionState.Disconnected);
225225

226226
document.getElementById("messageInput").disabled = true;

0 commit comments

Comments
 (0)