Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/architecture/blazor-for-web-forms-developers/data.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Data access and management
description: Learn how to access and handle data in ASP.NET Web Forms and Blazor.
author: csharpfritz
author: csharpfritz
ms.author: jefritz
no-loc: [Blazor]
ms.date: 04/11/2022
Expand Down Expand Up @@ -48,7 +48,7 @@ public class Product
}
```

Product has a primary key and three additional fields that would be created in our database:
Product has a primary key and three additional fields that would be created in our database:

- EF will identify the `Id` property as a primary key by convention.
- `Name` will be stored in a column configured for text storage. The `[Required]` attribute decorating this property will add a `not null` constraint to help enforce this declared behavior of the property.
Expand Down Expand Up @@ -105,9 +105,9 @@ When ASP.NET was first released, SOAP services were the preferred way for web se
builder.Services.AddHttpClient("github", client =>
{
client.BaseAddress = new Uri("http://api.github.com/");
// Github API versioning
// GitHub API versioning
client.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");
// Github requires a user-agent
// GitHub requires a user-agent
client.DefaultRequestHeaders.Add("User-Agent", "BlazorWebForms-Sample");
});
```
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/maui/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Multi-platform apps experience problems similar to both desktop and web-based ap

A unit test takes a small unit of the app, typically a method, isolates it from the remainder of the code, and verifies that it behaves as expected. Its goal is to check that each unit of functionality performs as expected, so errors don't propagate throughout the app. Detecting a bug where it occurs is more efficient than observing the effect of a bug indirectly at a secondary point of failure.

Unit testing has the most significant effect on code quality when it's an integral part of the software development workflow. Unit tests can act as design documentation and functional specifications for an application. As soon as a method has been written, unit tests should be written that verify the method's behavior in response to standard, boundary, and incorrect input data cases and check any explicit or implicit assumptions made by the code. Alternatively, with test-driven development, unit tests are written before the code. For more information on test-driven development and how to implement it, see [Walkthrough: Test-driven development using Test Explorer.](/visualstudio/test/quick-start-test-driven-development-with-test-explorer)
Unit testing has the most significant effect on code quality when it's an integral part of the software development workflow. Unit tests can act as design documentation and functional specifications for an application. As soon as a method has been written, unit tests should be written that verify the method's behavior in response to standard, boundary, and incorrect input data cases and check any explicit or implicit assumptions made by the code. Alternatively, with test-driven development, unit tests are written before the code. For more information on test-driven development and how to implement it, see [Walkthrough: Test-driven development using Test Explorer.](/visualstudio/test/quick-start-test-driven-development-with-test-explorer).

> [!NOTE]
> Unit tests are very effective against regression. That is, functionality that used to work, but has been disturbed by a faulty update.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The system is simple:

So, simplifying, that's the core idea of Docker.

In Docker, each layer is the resulting set of changes that happen to the filesystem after executing a command, such as, installing a program.
In Docker, each layer is the resulting set of changes that happen to the filesystem after executing a command, such as installing a program.

So, when you "look" at the filesystem after the layer has been copied, you see all the files, included in the layer when the program was installed.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Use IHttpClientFactory to implement resilient HTTP requests
description: Learn how to use IHttpClientFactory, available since .NET Core 2.1, for creating `HttpClient` instances, making it easy for you to use it in your applications.
description: Learn how to use IHttpClientFactory, available since .NET Core 2.1, for creating `HttpClient` instances, making it easy for you to use it in your applications.
ms.date: 01/13/2021
---
# Use IHttpClientFactory to implement resilient HTTP requests
Expand Down Expand Up @@ -54,7 +54,7 @@ There are several ways that you can use `IHttpClientFactory` in your application
For the sake of brevity, this guidance shows the most structured way to use `IHttpClientFactory`, which is to use Typed Clients (Service Agent pattern). However, all options are documented and are currently listed in this [article covering the `IHttpClientFactory` usage](/aspnet/core/fundamentals/http-requests#consumption-patterns).

> [!NOTE]
> If your app requires cookies, it might be better to avoid using <xref:System.Net.Http.IHttpClientFactory> in your app. For alternative ways of managing clients, see [Guidelines for using HTTP clients](../../../fundamentals/networking/http/httpclient-guidelines.md)
> If your app requires cookies, it might be better to avoid using <xref:System.Net.Http.IHttpClientFactory> in your app. For alternative ways of managing clients, see [Guidelines for using HTTP clients](../../../fundamentals/networking/http/httpclient-guidelines.md).

## How to use Typed Clients with IHttpClientFactory

Expand Down Expand Up @@ -191,19 +191,19 @@ Up to this point, the above code snippet only shows the example of performing re

## Additional resources

- **HttpClient guidelines for .NET**
- **HttpClient guidelines for .NET**
[https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines](../../../fundamentals/networking/http/httpclient-guidelines.md)

- **Using HttpClientFactory in .NET**
- **Using HttpClientFactory in .NET**
[https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory](../../../core/extensions/httpclient-factory.md)

- **Using HttpClientFactory in ASP.NET Core**
- **Using HttpClientFactory in ASP.NET Core**
[https://learn.microsoft.com/aspnet/core/fundamentals/http-requests](/aspnet/core/fundamentals/http-requests)

- **HttpClientFactory source code in the `dotnet/runtime` GitHub repository**
- **HttpClientFactory source code in the `dotnet/runtime` GitHub repository**
<https://github.com/dotnet/runtime/tree/release/7.0/src/libraries/Microsoft.Extensions.Http/>

- **Polly (.NET resilience and transient-fault-handling library)**
- **Polly (.NET resilience and transient-fault-handling library)**
<https://thepollyproject.azurewebsites.net/>

>[!div class="step-by-step"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,11 @@ public class MyClass
}
```

In these cases, the threat model and security guarantees are the same as the [DataSet.ReadXml and DataTable.ReadXml section](#dsrdtr)
In these cases, the threat model and security guarantees are the same as the [DataSet.ReadXml and DataTable.ReadXml section](#dsrdtr).

## Deserialize a DataSet or DataTable via JsonConvert

The popular third-party Newtonsoft library [Json.NET](https://www.newtonsoft.com/json) can be used to deserialize `DataSet` and `DataTable` instances, as shown in the following code:
The third-party Newtonsoft library [Json.NET](https://www.newtonsoft.com/json) can be used to deserialize `DataSet` and `DataTable` instances, as shown in the following code:

```csharp
using System.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Entity SQL is a storage-independent query language that is similar to SQL. Entit

- When a query must be dynamically constructed at run time. In this case, you should also consider using the query builder methods of <xref:System.Data.Objects.ObjectQuery%601> instead of constructing an Entity SQL query string at run time.

- When you want to define a query as part of the model definition. Only Entity SQL is supported in a data model. For more information, see [QueryView Element (MSL)](/ef/ef6/modeling/designer/advanced/edmx/msl-spec#queryview-element-msl)
- When you want to define a query as part of the model definition. Only Entity SQL is supported in a data model. For more information, see [QueryView Element (MSL)](/ef/ef6/modeling/designer/advanced/edmx/msl-spec#queryview-element-msl).

- When using EntityClient to return read-only entity data as rowsets using a <xref:System.Data.EntityClient.EntityDataReader>. For more information, see [EntityClient Provider for the Entity Framework](../entityclient-provider-for-the-entity-framework.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ms.assetid: 76b0949a-5b23-4cfc-84cc-154f713e2e12

This topic introduces guidelines and conventions for implementing <xref:System.Windows.Automation.Provider.ISelectionItemProvider>, including information about properties, methods, and events. Links to additional references are listed at the end of the overview.

The <xref:System.Windows.Automation.SelectionItemPattern> control pattern is used to support controls that act as individual, selectable child items of container controls that implement <xref:System.Windows.Automation.Provider.ISelectionProvider>. For examples of controls that implement the SelectionItem control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md)
The <xref:System.Windows.Automation.SelectionItemPattern> control pattern is used to support controls that act as individual, selectable child items of container controls that implement <xref:System.Windows.Automation.Provider.ISelectionProvider>. For examples of controls that implement the SelectionItem control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md).

<a name="Implementation_Guidelines_and_Conventions"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ms.assetid: 3a0435c0-a791-4ad7-ba92-a4c1d1231fde

Programmatic access provides the ability to imitate, through code, any interaction and experience exposed by traditional mouse and keyboard input. UI Automation enables programmatic access through five components:

- The UI Automation tree facilitates navigation through the structure of the UI. The tree is built from the collection of hWnd's. For more information, see [UI Automation Tree Overview](ui-automation-tree-overview.md)
- The UI Automation tree facilitates navigation through the structure of the UI. The tree is built from the collection of hWnd's. For more information, see [UI Automation Tree Overview](ui-automation-tree-overview.md).

- Automation elements are individual components in the UI. These can often be more granular than an hWnd. For more information, see [UI Automation Control Types Overview](ui-automation-control-types-overview.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef enum CorDebugStateChange

## Remarks

A member of the `CorDebugStateChange` enumeration is provided as an argument when the debugger calls the `ProcessStateChanged` method either with [ICorDebugProcess4::ProcessStateChanged](icordebugprocess4-processstatechanged-method.md) or [ICorDebugProcess6::ProcessStateChanged](icordebugprocess6-processstatechanged-method.md)
A member of the `CorDebugStateChange` enumeration is provided as an argument when the debugger calls the `ProcessStateChanged` method either with [ICorDebugProcess4::ProcessStateChanged](icordebugprocess4-processstatechanged-method.md) or [ICorDebugProcess6::ProcessStateChanged](icordebugprocess6-processstatechanged-method.md).

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This section describes the unmanaged enumerations that the debugging API uses.
Provides values that are used by the [ICLRDebugging::OpenVirtualProcess](iclrdebugging-openvirtualprocess-method.md) method.

[CLRDataAddressType Enumeration](clrdataaddresstype-enumeration.md)\
Indicates the type of data contained at a given address by the [IXCLRDataProcess::GetAddressType](ixclrdataprocess-getaddresstype-method.md)
Indicates the type of data contained at a given address by the [IXCLRDataProcess::GetAddressType](ixclrdataprocess-getaddresstype-method.md).

[CLRDataByNameFlag Enumeration](clrdatabynameflag-enumeration.md)\
Indicates how names should match in a search.
Expand Down
Loading
Loading