Skip to content

Commit

Permalink
Merge pull request #36415 from dotnet/main
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner authored Jul 27, 2023
2 parents dc141c8 + 729fa36 commit 5248645
Show file tree
Hide file tree
Showing 31 changed files with 585 additions and 198 deletions.
20 changes: 18 additions & 2 deletions .openpublishing.redirection.fundamentals.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,17 @@
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0024.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0023-ide0024"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0029-ide0030.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0029.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030"
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0030.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030"
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0038.md",
Expand All @@ -100,6 +104,10 @@
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0074.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0054-ide0074"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0078.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0078-ide0260"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0160.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0160-ide0161"
Expand All @@ -108,6 +116,14 @@
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0161.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0160-ide0161"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0260.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0078-ide0260"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide0270.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270"
},
{
"source_path_from_root": "/docs/fundamentals/code-analysis/style-rules/ide1006.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/style-rules/naming-rules"
Expand Down
6 changes: 3 additions & 3 deletions docs/azure/includes/dotnet-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
| Microsoft.Azure.Devices.Provisioning.Transport.Mqtt | NuGet [1.17.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Mqtt/1.17.1)<br>NuGet [1.18.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Mqtt/1.18.0-preview-001) | | |
| Microsoft.Azure.Devices.Shared | NuGet [1.30.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Shared/1.30.1)<br>NuGet [1.31.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Shared/1.31.0-preview-001) | | |
| Microsoft.Azure.Functions.Worker | NuGet [1.18.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.18.0) | | |
| Microsoft.Azure.Functions.Worker.Sdk | NuGet [1.12.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.12.0) | | |
| Microsoft.Azure.Functions.Worker.Sdk | NuGet [1.13.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.13.0) | | |
| Microsoft.Azure.uamqp | NuGet [1.2.11](https://www.nuget.org/packages/Microsoft.Azure.uamqp/1.2.11) | | |
| Microsoft.Azure.umqtt | NuGet [1.1.11](https://www.nuget.org/packages/Microsoft.Azure.umqtt/1.1.11) | | |
| Mobile Apps | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Mobile.Server/2.0.3) | | |
Expand Down Expand Up @@ -450,7 +450,7 @@
| Microsoft.Azure.Functions.Worker.Core | NuGet [1.14.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Core/1.14.0) | | |
| Microsoft.Azure.Functions.Worker.Extensions.Abstractions | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Abstractions/1.3.0) | | |
| Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights/1.0.0-preview4) | | |
| Microsoft.Azure.Functions.Worker.Extensions.CosmosDB | NuGet [4.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.0.1)<br>NuGet [4.3.1-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.3.1-preview1) | | |
| Microsoft.Azure.Functions.Worker.Extensions.CosmosDB | NuGet [4.4.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.4.0) | | |
| Microsoft.Azure.Functions.Worker.Extensions.EventGrid | NuGet [3.3.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventGrid/3.3.0) | | |
| Microsoft.Azure.Functions.Worker.Extensions.EventHubs | NuGet [5.5.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventHubs/5.5.0) | | |
| Microsoft.Azure.Functions.Worker.Extensions.Http | NuGet [3.0.13](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http/3.0.13) | | |
Expand All @@ -471,7 +471,7 @@
| Microsoft.Azure.Functions.Worker.Grpc | NuGet [1.13.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/1.13.0) | | |
| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.2678](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.2678) | | |
| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.2678](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.2678) | | |
| Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.1.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.1.2) | | |
| Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.2.0) | | |
| Microsoft.Azure.Functions.Worker.Sdk.Generators | NuGet [1.1.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Generators/1.1.0-preview4) | | |
| Microsoft.Azure.WebJobs.CosmosDb.Mongo | NuGet [1.0.4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.CosmosDb.Mongo/1.0.4) | | |
| Microsoft.Azure.WebJobs.Extensions.Kusto | NuGet [1.0.7-Preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Kusto/1.0.7-Preview) | | |
Expand Down
4 changes: 3 additions & 1 deletion docs/core/tools/global-tools-how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Tutorial: Install and use a .NET global tool"
description: Learn how to install and use a .NET tool as a global tool.
ms.topic: tutorial
ms.date: 02/12/2020
ms.date: 07/25/2023
recommendations: false
---

Expand Down Expand Up @@ -35,6 +35,8 @@ This tutorial teaches you how to install and use a global tool. You use a tool t
Tool 'microsoft.botsay' (version '1.0.0') was successfully installed.
```

[!INCLUDE[](~/includes/dotnet-tool-install-arch-options.md)]

1. Invoke the tool:

```console
Expand Down
4 changes: 3 additions & 1 deletion docs/core/tools/global-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: .NET tools
description: How to install, use, update, and remove .NET tools. Covers global tools, tool-path tools, and local tools.
author: KathleenDollard
ms.topic: how-to
ms.date: 08/10/2022
ms.date: 07/25/2023
ms.custom: devdivchpfy22
---
# How to manage .NET tools
Expand Down Expand Up @@ -61,6 +61,8 @@ You can invoke the tool using the following command: dotnetsay
Tool 'dotnetsay' (version '2.1.4') was successfully installed.
```

[!INCLUDE[](~/includes/dotnet-tool-install-arch-options.md)]

The default location for a tool's binaries depends on the operating system:

| OS | Path |
Expand Down
2 changes: 2 additions & 0 deletions docs/csharp/language-reference/operators/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ The following table lists the C# operators starting with the highest precedence
| [c ? t : f](conditional-operator.md) | Conditional operator |
| [x = y](assignment-operator.md), [x += y](arithmetic-operators.md#compound-assignment), [x -= y](arithmetic-operators.md#compound-assignment), [x *= y](arithmetic-operators.md#compound-assignment), [x /= y](arithmetic-operators.md#compound-assignment), [x %= y](arithmetic-operators.md#compound-assignment), [x &= y](boolean-logical-operators.md#compound-assignment), [x &#124;= y](boolean-logical-operators.md#compound-assignment), [x ^= y](boolean-logical-operators.md#compound-assignment), [x <<= y](bitwise-and-shift-operators.md#compound-assignment), [x >>= y](bitwise-and-shift-operators.md#compound-assignment), [x >>>= y](bitwise-and-shift-operators.md#compound-assignment), [x ??= y](null-coalescing-operator.md), [=>](lambda-operator.md) | Assignment and lambda declaration |

For information about the precedence of [logical pattern combinators](patterns.md#logical-patterns), see the [Precedence and order of checking of logical patterns](patterns.md#precedence-and-order-of-checking) section of the [Patterns](patterns.md) article.

## Operator associativity

When operators have the same precedence, associativity of the operators determines the order in which the operations are performed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void TraceMethod() {}

## Null-conditional operators `?.` and `?[]`

A null-conditional operator applies a [member access](#member-access-expression-), `?.`, or [element access](#indexer-operator-), `?[]`, operation to its operand only if that operand evaluates to non-null; otherwise, it returns `null`. That is,
A null-conditional operator applies a [member access](#member-access-expression-) (`?.`) or [element access](#indexer-operator-) (`?[]`) operation to its operand only if that operand evaluates to non-null; otherwise, it returns `null`. That is:

- If `a` evaluates to `null`, the result of `a?.x` or `a?[x]` is `null`.
- If `a` evaluates to non-null, the result of `a?.x` or `a?[x]` is the same as the result of `a.x` or `a[x]`, respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ms.assetid: 088b1f0d-c1af-4fe1-b4b8-196fd5ea9132
---
# ?? and ??= operators - the null-coalescing operators

<!--
<!--
Note: All the remaining acrolinx issues in this article are because of the `??` and `??=` operator. Acrolinx believes it's a misspelling of the ? mark.
-->

Expand Down Expand Up @@ -89,7 +89,7 @@ For more information about the `??=` operator, see the [feature proposal note](~

## See also

- [Use coalesce expression (style rules IDE0029 and IDE0030)](../../../fundamentals/code-analysis/style-rules/ide0029-ide0030.md)
- [Null check can be simplified (IDE0029, IDE0030, and IDE0270)](../../../fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270.md)
- [C# reference](../index.md)
- [C# operators and expressions](index.md)
- [?. and ?[] operators](member-access-operators.md#null-conditional-operators--and-)
Expand Down
6 changes: 3 additions & 3 deletions docs/csharp/language-reference/operators/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ As the preceding example shows, you can repeatedly use the pattern combinators i

### Precedence and order of checking

When a logical pattern is a pattern of an `is` expression, the precedence of logical pattern combinators is **higher** than the precedence of logical operators. Otherwise, the precedence of logical pattern combinators is **lower** than the precedence of logical and conditional logical operators.

The pattern combinators are ordered from the highest precedence to the lowest as shown in the following list:
The pattern combinators are ordered from the highest precedence to the lowest as follows:

- `not`
- `and`
- `or`

When a logical pattern is a pattern of an `is` expression, the precedence of logical pattern combinators is **higher** than the precedence of logical operators (both [bitwise logical](bitwise-and-shift-operators.md) and [Boolean logical](boolean-logical-operators.md) operators). Otherwise, the precedence of logical pattern combinators is **lower** than the precedence of logical and conditional logical operators. For the complete list of C# operators ordered by precedence level, see the [Operator precedence](index.md#operator-precedence) section of the [C# operators](index.md) article.

To explicitly specify the precedence, use parentheses, as the following example shows:

:::code language="csharp" source="snippets/patterns/LogicalPatterns.cs" id="WithParentheses":::
Expand Down
20 changes: 20 additions & 0 deletions docs/csharp/linq/perform-inner-joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ The following example creates two collections that contain objects of two user-d

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_1":::

You achieve the same results using the <xref:System.Linq.Enumerable.Join%2A> method syntax:

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_method_syntax_1":::

Note that the `Person` object whose `LastName` is "Huff" does not appear in the result set because there is no `Pet` object that has `Pet.Owner` equal to that `Person`.

## Example - Composite key join
Expand All @@ -41,6 +45,10 @@ The following example uses a list of `Employee` objects and a list of `Student`

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_2":::

You can use the <xref:System.Linq.Enumerable.Join%2A> method, as shown in the following example:

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_method_syntax_2":::

## Example - Multiple join

Any number of join operations can be appended to each other to perform a multiple join. Each `join` clause in C# correlates a specified data source with the results of the previous join.
Expand All @@ -53,6 +61,10 @@ The second `join` clause in C# correlates the anonymous types returned by the fi

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_3":::

The equivalent using multiple <xref:System.Linq.Enumerable.Join%2A> method uses the same approach with the anonymous type (in the example below it's named `commonOwner`):

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_method_syntax_3":::

## Example - Inner join by using grouped join

The following example shows you how to implement an inner join by using a group join.
Expand All @@ -65,6 +77,14 @@ The result of `query1` is equivalent to the result set that would have been obta

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_4":::

The same results can be achieved using <xref:System.Linq.Enumerable.GroupJoin%2A> method, as follows:

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_method_syntax_4":::

Note that this approach requires chaining the query results with <xref:System.Linq.Enumerable.SelectMany%2A> to create the final list of Owner - Pet relation based on the results of group join. To avoid chaining, the single <xref:System.Linq.Enumerable.Join%2A> method can be used as presented below:

:::code language="csharp" source="../../../samples/snippets/csharp/concepts/linq/LinqSamples/InnerJoins.cs" id="inner_joins_method_syntax_5":::

## See also

- <xref:System.Linq.Enumerable.Join%2A>
Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are two primary concepts in F#: functions and types. This tour emphasizes

## Executing the code online

If you don't have F# installed on your machine, you can execute all of the samples in your browser with [Try F# in Fable](https://fable.io/repl3/). Fable is a dialect of F# that executes directly in your browser. To view the samples that follow in the REPL, check out **Samples > Learn > Tour of F#** in the left-hand menu bar of the Fable REPL.
If you don't have F# installed on your machine, you can execute all of the samples in your browser with [Try F# in Fable](https://fable.io/repl/). Fable is a dialect of F# that executes directly in your browser. To view the samples that follow in the REPL, check out **Samples > Learn > Tour of F#** in the left-hand menu bar of the Fable REPL.

## Functions and Modules

Expand Down
5 changes: 4 additions & 1 deletion docs/fundamentals/code-analysis/style-rules/ide0019.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dev_langs:

## Overview

This style rule concerns the use of C# [pattern matching](../../../csharp/fundamentals/functional/pattern-matching.md) over an `as` expression followed by a `null` check.
This style rule concerns the use of C# [pattern matching](../../../csharp/fundamentals/functional/pattern-matching.md) over an `as` expression followed by a `null` check. This rule is similar to [IDE0260](ide0078-ide0260.md), which flags the use of an `as` expression followed by a member read through the null-conditional operator.

## Options

Expand All @@ -37,6 +37,8 @@ For more information about configuring options, see [Option format](language-rul

### csharp_style_pattern_matching_over_as_with_null_check

This option also configures rule [IDE0260](ide0078-ide0260.md).

| Property | Value | Description |
| ------------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| **Option name** | csharp_style_pattern_matching_over_as_with_null_check | |
Expand Down Expand Up @@ -81,6 +83,7 @@ For more information, see [How to suppress code analysis warnings](../suppress-w

## See also

- [Use pattern matching (IDE0078 and IDE0260)](ide0078-ide0260.md)
- [Pattern matching in C#](../../../csharp/fundamentals/functional/pattern-matching.md)
- [Code style language rules](language-rules.md)
- [Code style rules reference](index.md)
Loading

0 comments on commit 5248645

Please sign in to comment.