Skip to content

Commit 61e97e7

Browse files
CamSopererjaintjain-msIEvangelistAshleighAdams
authored
Push live (#32203)
* fixes #21591 (#32186) * fixes #21591 * update file path Co-authored-by: Tarun Jain <v-tjain@microsoft.com> * fixes #31983 (#32157) * fixes #31983 * Update docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md Co-authored-by: David Pine <david.pine@microsoft.com> Co-authored-by: Tarun Jain <v-tjain@microsoft.com> Co-authored-by: David Pine <david.pine@microsoft.com> * Fix issue - #31462 - Observations in maui-ebook (#32111) Co-authored-by: Tarun Jain <v-tjain@microsoft.com> * fixes #31985 (#32156) * fixes #31985 * Update docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md Co-authored-by: David Pine <david.pine@microsoft.com> Co-authored-by: Tarun Jain <v-tjain@microsoft.com> Co-authored-by: David Pine <david.pine@microsoft.com> * Update quest.yml (#32188) * Update quest.yml (#32189) * Add a note regarding supressing CS0282 (#32170) Dotnet provides the means to inhibit this message, but it was not clear from the warning documentation how to properly supress the warning and express intent that the layout of the struct was not significant * Add defaultconstraint_CSharpKeyword (#32184) * Update quest.yml (#32190) * Update quest.yml * Update quest.yml * Update using-properties.md (#32185) * Create quest-bulk.yml (#32192) * -r changed from --results-directory to --runtime in .NET 7 (#32163) * Revive Point of Service docs from the dead (#32079) * initial commit * Fix indent * better paths * little tweaks * fix link * Update docs/framework/additional-apis/index.md Co-authored-by: David Pine <david.pine@microsoft.com> * initial conversion * tables tables tables * markdownlint pass * missed one * another pass * xrefs, part 1 * Revert "xrefs, part 1" This reverts commit 22185ae. * Populated all the xrefs * images * API reference link * fix toc * add descriptions * Removed extra newlines * Fixed table warnings * fix metadata * Made all the "see alsos" bulleted lists * v1.12->v1.14 Co-authored-by: David Pine <david.pine@microsoft.com> * Update quest.yml (#32199) * Update quest-bulk.yml (#32202) * Update quest-bulk.yml * Update quest-bulk.yml Try `-1` instead. * Update quest-bulk.yml * Added missing link for actors.md (#32201) * Legacy FileStream mode and symlink breaking changes (#31602) Co-authored-by: Tarun Jain <87998741+erjain@users.noreply.github.com> Co-authored-by: Tarun Jain <v-tjain@microsoft.com> Co-authored-by: David Pine <david.pine@microsoft.com> Co-authored-by: Ashleigh Adams <ashleigh.k.adams@gmail.com> Co-authored-by: Youssef Victor <youssefvictor00@gmail.com> Co-authored-by: Eli Entelis <42981948+eli-entelis@users.noreply.github.com> Co-authored-by: Tom Dykstra <tdykstra@microsoft.com> Co-authored-by: Henrik Schönfelder <36896808+HTSchoenfelder@users.noreply.github.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
1 parent ab38c50 commit 61e97e7

File tree

102 files changed

+8524
-56
lines changed

Some content is hidden

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

102 files changed

+8524
-56
lines changed

.github/workflows/quest-bulk.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "bulk quest import"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
reason:
6+
description: "The reason for running the bulk import workflow"
7+
required: true
8+
default: "Initial import into Quest (Azure DevOps)"
9+
10+
jobs:
11+
bulk-import:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
issues: write
16+
17+
steps:
18+
- name: "Print manual bulk import run reason"
19+
if: ${{ github.event_name == 'workflow_dispatch' }}
20+
run: |
21+
echo "Reason: ${{ github.event.inputs.reason }}"
22+
23+
- name: bulk-sequester
24+
if: ${{ github.event_name == 'workflow_dispatch' }}
25+
id: bulk-sequester
26+
uses: dotnet/docs-tools/actions/sequester@main
27+
env:
28+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
29+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
30+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
31+
with:
32+
org: ${{ github.repository_owner }}
33+
repo: ${{ github.repository }}
34+
issue: '-1'

.github/workflows/quest.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "quest import"
22
on:
33
issues:
44
types:
5-
[ labeled ]
5+
[ labeled, closed, reopened, assigned, unassigned ]
66
workflow_dispatch:
77
inputs:
88
reason:
@@ -15,7 +15,12 @@ on:
1515

1616
jobs:
1717
import:
18-
if: github.event.label.name == join(fromJson('[":", "world_map", ":", " reQUEST"]'), '') || github.event_name == 'workflow_dispatch'
18+
if: |
19+
github.event_name == 'workflow_dispatch' ||
20+
github.event.label.name == ':world_map: reQUEST' ||
21+
github.event.label.name == ':pushpin: seQUESTered' ||
22+
contains(github.event.issue.labels.*.name, ':world_map: reQUEST') ||
23+
contains(github.event.issue.labels.*.name, ':pushpin: seQUESTered')
1924
runs-on: ubuntu-latest
2025
permissions:
2126
contents: write
@@ -32,7 +37,7 @@ jobs:
3237
- name: manual-sequester
3338
if: ${{ github.event_name == 'workflow_dispatch' }}
3439
id: manual-sequester
35-
uses: BillWagner/Quest2GitHub@main
40+
uses: dotnet/docs-tools/actions/sequester@main
3641
env:
3742
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
3843
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
@@ -46,7 +51,7 @@ jobs:
4651
- name: auto-sequester
4752
if: ${{ github.event_name != 'workflow_dispatch' }}
4853
id: auto-sequester
49-
uses: BillWagner/Quest2GitHub@main
54+
uses: dotnet/docs-tools/actions/sequester@main
5055
env:
5156
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
5257
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}

docfx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@
303303
"docs/core/whats-new/**/**.md": "adegeo",
304304
"docs/csharp/**/*.*": "billwagner",
305305
"docs/framework/**/**.md": "gewarren",
306+
"docs/framework/additional-apis/pos-for-net/**/**.md": "TerryWarwick",
306307
"docs/framework/app-domains/**/**.md": "gewarren",
307308
"docs/framework/configure-apps/file-schema/network/**/**.md": "karelz",
308309
"docs/framework/configure-apps/file-schema/wcf/**/**.md": "HongGit",

docs/architecture/dapr-for-net-developers/dapr-at-20000-feet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The following table describes the infrastructure services provided by each block
6464
| [Bindings](bindings.md) | Trigger code from events raised by external resources with bi-directional communication. |
6565
| [Observability](observability.md) | Monitor and measure message calls across networked services. |
6666
| [Secrets](secrets-management.md) | Securely access external secret stores. |
67-
| Actors | Encapsulate logic and data in reusable actor objects. |
67+
| [Actors](actors.md) | Encapsulate logic and data in reusable actor objects. |
6868

6969
Building blocks abstract the implementation of distributed application capabilities from your services. Figure 2-3 shows this interaction.
7070

docs/architecture/maui/accessing-remote-data.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ public async Task<TResult> GetAsync<TResult>(string uri, string token = "")
8282
HttpResponseMessage response = await httpClient.GetAsync(uri);
8383

8484
await HandleResponse(response);
85-
string serialized = await response.Content.ReadAsStringAsync();
86-
87-
TResult result = JsonConvert.DeserializeObject<TResult>(serialized, _serializerSettings);
85+
TResult result = await response.Content.ReadFromJsonAsync<TResult>();
8886

8987
return result;
9088
}
@@ -202,15 +200,13 @@ public async Task<TResult> PostAsync<TResult>(
202200
{
203201
HttpClient httpClient = GetOrCreateHttpClient(token);
204202

205-
var content = new StringContent(JsonConvert.SerializeObject(data));
203+
var content = new StringContent(JsonSerializer.Serialize(data));
206204
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
207205
HttpResponseMessage response = await httpClient.PostAsync(uri, content);
208206

209207
await HandleResponse(response);
210-
string serialized = await response.Content.ReadAsStringAsync();
211-
212-
TResult result = JsonConvert.DeserializeObject<TResult>(serialized, _serializerSettings);
213-
208+
TResult result = await response.Content.ReadFromJsonAsync<TResult>();
209+
214210
return result;
215211
}
216212
```

docs/architecture/maui/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ The eShopOnContainers project contains the following folders:
134134

135135
## Summary
136136

137-
Microsoft's cross-platform multi-platform app development tools and platforms provide a comprehensive solution for B2E, B2B, and B2C mobile client apps, providing the ability to share code across all target platforms (iOS, Android, and Windows) and helping to lower the total cost of ownership. Apps can share their user interface and app logic code, while retaining the native platform look and feel.
137+
Microsoft's cross-platform multi-platform app development tools and platforms provide a comprehensive solution for B2E, B2B, and B2C mobile client apps, providing the ability to share code across all target platforms (iOS, macOS, Android, and Windows) and helping to lower the total cost of ownership. Apps can share their user interface and app logic code, while retaining the native platform look and feel.
138138

139139
Developers of enterprise apps face several challenges that can alter the architecture of the app during development. Therefore, it's important to build an app so that it can be modified or extended over time. Designing for such adaptability can be difficult, but typically involves partitioning an app into discrete, loosely coupled components that can be easily integrated together into an app.

docs/architecture/maui/mvvm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The benefits of using the MVVM pattern are as follows:
2626

2727
- If an existing model implementation encapsulates existing business logic, it can be difficult or risky to change it. In this scenario, the view model acts as an adapter for the model classes and prevents you from making major changes to the model code.
2828
- Developers can create unit tests for the view model and the model, without using the view. The unit tests for the view model can exercise exactly the same functionality as used by the view.
29-
- The app UI can be redesigned without touching the code, provided that the view is implemented entirely in XAML. Therefore, a new version of the view should work with the existing view model.
29+
- The app UI can be redesigned without touching the view model and model code, provided that the view is implemented entirely in XAML or C#. Therefore, a new version of the view should work with the existing view model.
3030
- Designers and developers can work independently and concurrently on their components during development. Designers can focus on the view, while developers can work on the view model and model components.
3131

3232
The key to using MVVM effectively lies in understanding how to factor app code into the correct classes and how the classes interact. The following sections discuss the responsibilities of each of the classes in the MVVM pattern.
@@ -35,7 +35,7 @@ The key to using MVVM effectively lies in understanding how to factor app code i
3535

3636
The view is responsible for defining the structure, layout, and appearance of what the user sees on screen. Ideally, each view is defined in XAML, with a limited code-behind that does not contain business logic. However, in some cases, the code-behind might contain UI logic that implements visual behavior that is difficult to express in XAML, such as animations.
3737

38-
In a .NET MAUI application, a view is typically a `Page`-derived or `ContentView`-derived class. However, views can also be represented by a data template, which specifies the UI elements to be used to visually represent an object when it's displayed. A data template as a view does not have any code-behind, and is designed to bind to a specific view model type.
38+
In a .NET MAUI application, a view is typically a `ContentPage`-derived or `ContentView`-derived class. However, views can also be represented by a data template, which specifies the UI elements to be used to visually represent an object when it's displayed. A data template as a view does not have any code-behind, and is designed to bind to a specific view model type.
3939

4040
> [!TIP]
4141
> Avoid enabling and disabling UI elements in the code-behind.

docs/architecture/maui/preface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.date: 06/18/2022
1010

1111
[!INCLUDE [download-alert](includes/download-alert.md)]
1212

13-
This eBook provides guidance on building cross-platform enterprise apps using .NET MAUI. .NET MAUI is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across platforms, including iOS, macOS Android, and Windows 10/11. It provides a comprehensive solution for Business to Employee (B2E), Business to Business (B2B), and Business to Consumer (B2C) apps, providing the ability to share code across all target platforms and helping to lower the total cost of ownership (TCO).
13+
This eBook provides guidance on building cross-platform enterprise apps using .NET MAUI. .NET MAUI is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across platforms, including iOS, macOS, Android, and Windows 10/11. It provides a comprehensive solution for Business to Employee (B2E), Business to Business (B2B), and Business to Consumer (B2C) apps, providing the ability to share code across all target platforms and helping to lower the total cost of ownership (TCO).
1414

1515
The guide provides architectural guidance for developing adaptable, maintainable, and testable .NET MAUI enterprise apps. Guidance is provided on how to implement MVVM, dependency injection, navigation, validation, and configuration management, while maintaining loose coupling. In addition, there's also guidance on performing authentication and authorization with IdentityServer, accessing data from containerized microservices, and unit testing.
1616

docs/architecture/maui/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.date: 07/09/2022
1212

1313
Any app that accepts input from users should ensure that the input is valid. An app could, for example, check for input that contains only characters in a particular range, is of a certain length, or matches a particular format. Without validation, a user can supply data that causes the app to fail. Proper validation enforces business rules and could help to prevent an attacker from injecting malicious data.
1414

15-
In the context of the Model-ViewModel-Model (MVVM) pattern, a view model or model will often be required to perform data validation and signal any validation errors to the view so that the user can correct them. The eShopOnContainers multi-platform app performs synchronous client-side validation of view model properties and notifies the user of any validation errors by highlighting the control that contains the invalid data, and by displaying error messages that inform the user of why the data is invalid. The image below shows the classes involved in performing validation in the eShopOnContainers multi-platform app.
15+
In the context of the Model-View-ViewModel (MVVM) pattern, a view model or model will often be required to perform data validation and signal any validation errors to the view so that the user can correct them. The eShopOnContainers multi-platform app performs synchronous client-side validation of view model properties and notifies the user of any validation errors by highlighting the control that contains the invalid data, and by displaying error messages that inform the user of why the data is invalid. The image below shows the classes involved in performing validation in the eShopOnContainers multi-platform app.
1616

1717
![Validation classes in the eShopOnContainers multi-platform app.](./media/validation-workflow.png)
1818

docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ There are several ways that you can use `IHttpClientFactory` in your application
5353

5454
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).
5555

56+
> [!NOTE]
57+
> 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)
58+
5659
## How to use Typed Clients with IHttpClientFactory
5760

5861
So, what's a "Typed Client"? It's just an `HttpClient` that's pre-configured for some specific use. This configuration can include specific values such as the base server, HTTP headers or time outs.

docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ await _context.SaveChangesAsync();
111111

112112
EF Core supports both synchronous and async methods for fetching and saving. In web applications, it's recommended to use the async/await pattern with the async methods, so that web server threads are not blocked while waiting for data access operations to complete.
113113

114+
For more information, see [Buffering and Streaming](/ef/core/performance/efficient-querying#buffering-and-streaming).
115+
114116
### Fetching related data
115117

116118
When EF Core retrieves entities, it populates all of the properties that are stored directly with that entity in the database. Navigation properties, such as lists of related entities, are not populated and may have their value set to null. This process ensures EF Core is not fetching more data than is needed, which is especially important for web applications, which must quickly process requests and return responses in an efficient manner. To include relationships with an entity using _eager loading_, you specify the property using the Include extension method on the query, as shown:
@@ -159,18 +161,17 @@ public class Basket : BaseEntity
159161

160162
public void AddItem(int catalogItemId, decimal unitPrice, int quantity = 1)
161163
{
162-
if (!Items.Any(i => i.CatalogItemId == catalogItemId))
164+
var existingItem = Items.FirstOrDefault(i => i.CatalogItemId == catalogItemId);
165+
if (existingItem == null)
163166
{
164167
_items.Add(new BasketItem()
165168
{
166169
CatalogItemId = catalogItemId,
167170
Quantity = quantity,
168171
UnitPrice = unitPrice
169172
});
170-
return;
171-
}
172-
var existingItem = Items.FirstOrDefault(i => i.CatalogItemId == catalogItemId);
173-
existingItem.Quantity += quantity;
173+
}
174+
else existingItem.Quantity += quantity;
174175
}
175176
}
176177
```

docs/breadcrumb/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ items:
102102
- name: Additional APIs
103103
tocHref: /dotnet/framework/additional-apis/
104104
topicHref: /dotnet/framework/additional-apis/index
105+
items:
106+
- name: Point of Service for .NET
107+
tocHref: /dotnet/framework/additional-apis/pos-for-net/
108+
topicHref: /dotnet/framework/additional-apis/pos-for-net/index
105109
- name: Application domains and assemblies
106110
tocHref: /dotnet/framework/app-domains/
107111
topicHref: /dotnet/framework/app-domains/index

docs/core/compatibility/7.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff
4545
| [Collectible Assembly in non-collectible AssemblyLoadContext](core-libraries/7.0/collectible-assemblies.md) || ✔️ | Preview 5 |
4646
| [Equals method behavior change for NaN](core-libraries/7.0/equals-nan.md) || ✔️ | Preview 5 |
4747
| [Generic type constraint on PatternContext\<T>](core-libraries/7.0/patterncontext-generic-constraint.md) ||| Preview 3 |
48+
| [Legacy FileStream strategy removed](core-libraries/7.0/filestream-compat-switch.md) || ✔️ | Preview 1 |
4849
| [Library support for older frameworks](core-libraries/7.0/old-framework-support.md) ||| Preview 1 |
4950
| [Maximum precision for numeric format strings](core-libraries/7.0/max-precision-numeric-format-strings.md) || ✔️ | RC 1 |
5051
| [SerializationFormat.Binary is obsolete](core-libraries/7.0/serializationformat-binary.md) ||| Preview 2 |
52+
| [Time fields on symbolic links](core-libraries/7.0/symbolic-link-timestamps.md) || ✔️ | Preview 1 |
5153
| [Tracking linked cache entries](core-libraries/7.0/memorycache-tracking.md) || ✔️ | Preview 1 |
5254
| [Validate CompressionLevel for BrotliStream](core-libraries/7.0/compressionlevel-validation.md) || ✔️ | Preview 1 |
5355

docs/core/compatibility/core-libraries/6.0/filestream-doesnt-sync-offset-with-os.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ".NET 6 breaking change: FileStream doesn't synchronize file offset with OS"
33
description: Learn about the .NET 6 breaking change in core .NET libraries where FileStream doesn't synchronize the file offset with the operating system.
4-
ms.date: 05/05/2021
4+
ms.date: 10/04/2022
55
---
66
# FileStream no longer synchronizes file offset with OS
77

@@ -65,6 +65,9 @@ With this change, <xref:System.IO.FileStream.ReadAsync%2A> operations are up to
6565
set DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM=1
6666
```
6767

68+
> [!NOTE]
69+
> This switch is only available in .NET 6. It was [removed in .NET 7](../7.0/filestream-compat-switch.md).
70+
6871
## Affected APIs
6972

7073
None.
@@ -73,15 +76,3 @@ None.
7376

7477
- [SetFilePointer function](/windows/win32/api/fileapi/nf-fileapi-setfilepointer)
7578
- [SetFilePointerEx function](/windows/win32/api/fileapi/nf-fileapi-setfilepointerex)
76-
77-
<!--
78-
79-
### Category
80-
81-
- Core .NET libraries
82-
83-
### Affected APIs
84-
85-
Not detectible via API analysis.
86-
87-
-->

docs/core/compatibility/core-libraries/6.0/filestream-position-updates-after-readasync-writeasync-completion.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ".NET 6 breaking change: FileStream.Position updated after ReadAsync or WriteAsync completion"
33
description: Learn about the .NET 6 breaking change in core .NET libraries where FileStream.Position is updated after ReadAsync or WriteAsync completion.
4-
ms.date: 05/05/2021
4+
ms.date: 10/04/2022
55
---
66
# FileStream.Position updates after ReadAsync or WriteAsync completes
77

@@ -68,18 +68,9 @@ Now, when buffering is enabled (that is, the `bufferSize` argument that's passed
6868
set DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM=1
6969
```
7070

71+
> [!NOTE]
72+
> This switch is only available in .NET 6. It was [removed in .NET 7](../7.0/filestream-compat-switch.md).
73+
7174
## Affected APIs
7275

7376
- <xref:System.IO.FileStream.Position?displayProperty=fullName>
74-
75-
<!--
76-
77-
### Category
78-
79-
- Core .NET libraries
80-
81-
### Affected APIs
82-
83-
- `P:System.IO.FileStream.Position`
84-
85-
-->

0 commit comments

Comments
 (0)