diff --git a/.editorconfig b/.editorconfig index 596c802dc93de..783b1c0ec29b8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,6 +22,8 @@ charset = utf-8-bom # Analyzers dotnet_analyzer_diagnostic.category-Security.severity = error dotnet_code_quality.ca1802.api_surface = private, internal +# SYSLIB5001: Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. +dotnet_diagnostic.SYSLIB5001.severity = suggestion # Miscellaneous style rules dotnet_sort_system_directives_first = true diff --git a/.github/policies/auto-merge.yml b/.github/policies/auto-merge.yml index e61ab0c1571cb..76c4db6968e27 100644 --- a/.github/policies/auto-merge.yml +++ b/.github/policies/auto-merge.yml @@ -18,11 +18,7 @@ configuration: branch: main - or: - isActivitySender: - user: azure-sdk - - isActivitySender: - user: dependabot - - isActivitySender: - user: dependabot[bot] + user: dotnet-policy-service[bot] then: - enableAutoMerge: mergeMethod: Squash diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index cd324611ad704..d4ca6799bd93e 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -356,8 +356,8 @@ | Communication Calling Windows Client | NuGet [1.9.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.9.0)
NuGet [1.10.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.10.0-beta.1) | | | | DotNetty | NuGet [0.7.6](https://www.nuget.org/packages/DotNetty.Common/0.7.6) | | | | HTTP ASPNETCore Analyzers | NuGet [1.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.Analyzers/1.0.2) | | | -| Item Templates NetCore | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetCore/4.0.5032) | | | -| Item Templates NetFx | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetFx/4.0.5032) | | | +| Item Templates NetCore | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetCore/4.0.5035) | | | +| Item Templates NetFx | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetFx/4.0.5035) | | | | Microsoft.Azure.DataFactoryTestingFramework.Expressions | NuGet [0.2.7](https://www.nuget.org/packages/Microsoft.Azure.DataFactoryTestingFramework.Expressions/0.2.7) | | | | Microsoft.Azure.Functions.Worker.OpenTelemetry | NuGet [1.1.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.OpenTelemetry/1.1.0-preview2) | | | | System Net Client Model | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/System.Net.ClientModel/1.0.0-beta.1) | | | @@ -392,7 +392,7 @@ | Common | NuGet [2.2.1](https://www.nuget.org/packages/Microsoft.Azure.Common/2.2.1) | | | | Common - Dependencies | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Common.Dependencies/1.0.0) | | | | Computer Vision | NuGet [7.0.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision/7.0.1) | | GitHub [7.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.ComputerVision_6.0.0-preview.1/sdk/cognitiveservices/Vision.ComputerVision) | -| Cosmos DB | NuGet [3.42.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.42.0)
NuGet [3.45.0-preview.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0-preview.0) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/cosmosdb) | GitHub [3.42.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) | +| Cosmos DB | NuGet [3.42.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.42.0)
NuGet [3.45.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0-preview.1) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/cosmosdb) | GitHub [3.42.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) | | Custom Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomImageSearch) | | Custom Image Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomImageSearch/2.0.0) | | | | Custom Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomSearch) | @@ -501,10 +501,10 @@ | Functions Extensions - Redis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Redis/1.0.0) | | | | Functions Extensions - Redis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Redis/1.0.0) | | | | Functions Extensions - Worker Extentions | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Dapr/1.0.1) | | | -| Functions item template pack for Microsoft Template Engine | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.5032) | | GitHub [4.0.5032](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions item template pack for Microsoft Template Engine | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.5035) | | GitHub [4.0.5035](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | | Functions OpenAPI app settings deserialization library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/2.0.0-preview2) | | | | Functions OpenAPI document and Swagger UI renderer library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/2.0.0-preview2) | | | -| Functions project template pack for Microsoft Template Engine | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.5032) | | GitHub [4.0.5032](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions project template pack for Microsoft Template Engine | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.5035) | | GitHub [4.0.5035](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | | Functions runtime assemblies for App Insights logging | NuGet [3.0.41](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/3.0.41) | | GitHub [3.0.41](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights) | | Functions runtime assemblies for logging | NuGet [4.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging/4.0.3) | | GitHub [4.0.3](https://github.com/Azure/azure-webjobs-sdk/tree/dev/src/Microsoft.Azure.WebJobs.Logging) | | Functions runtime assemblies for Microsoft.Azure.WebJobs.Host | NuGet [3.0.41](https://www.nuget.org/packages/Microsoft.Azure.WebJobs/3.0.41) | | GitHub [3.0.41](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs) | @@ -538,8 +538,8 @@ | Microsoft.Azure.Functions.Worker.Extensions.Timer | NuGet [4.3.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Timer/4.3.1) | | | | Microsoft.Azure.Functions.Worker.Extensions.Warmup | NuGet [4.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Warmup/4.0.2) | | | | Microsoft.Azure.Functions.Worker.Grpc | NuGet [1.17.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/1.17.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/2.0.0-preview2) | | | -| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.5032) | | | -| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.5032](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.5032) | | | +| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.5035) | | | +| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.5035](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.5035) | | | | Microsoft.Azure.Functions.Worker.Sdk | NuGet [1.17.4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.17.4)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/2.0.0-preview2) | | | | Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.2.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.2.2) | | | | Microsoft.Azure.Functions.Worker.Sdk.Generators | NuGet [1.3.4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Generators/1.3.4) | | | diff --git a/docs/core/tools/dotnet-add-package.md b/docs/core/tools/dotnet-add-package.md index 4a6ef4f2a733e..aded0480bcd83 100644 --- a/docs/core/tools/dotnet-add-package.md +++ b/docs/core/tools/dotnet-add-package.md @@ -51,6 +51,74 @@ The *ToDo.csproj* file now contains a [``](/nuget/consume-pack ``` +If the project is onboarded onto [Central Package Management (CPM)](https://devblogs.microsoft.com/nuget/introducing-central-package-management/) the `` element in the `Directory.Packages.props file` is added/updated and the `` element is added to the project file. + +The following scenarios are currently supported. These examples assume that the latest version of `Microsoft.EntityFrameworkCore` is 6.0.4. Additional scenarios related to CPM are documented in [this design spec](https://github.com/NuGet/Home/pull/11915). + +Scenario 1: `` does not exist in the project file, `` element does not exist in the `Directory.Packages.props file`, and the version argument is not passed from the commandline. + + CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore` + + The `` element is added to the `Directory.Packages.props file`. + + ```xml + + ``` + + The `` element is added to the project file. + + ```xml + + ``` + +Scenario 2: `` does not exist in the project file, `` element does not exist in the `Directory.Packages.props file`, and the version argument is passed from the commandline. + + CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore --version 5.0.4` + + The `` element is added to the `Directory.Packages.props file`. + + ```xml + + ``` + + The `` element is added to the project file. + + ```xml + + ``` + +Scenario 3: `` does not exist in the project file, `` element does exist in the `Directory.Packages.props file`, and the version argument is not passed from the commandline. + + CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore` + + The `` element is added to the `Directory.Packages.props file`. + + ```xml + + ``` + +The `` element is added to the project file. + + ```xml + + ``` + +Scenario 4: `` does not exist in the project file, `` element does exist in the `Directory.Packages.props file`, and the version argument is passed from the commandline. + + CLI command that is executed: `dotnet add ToDo.csproj package Microsoft.EntityFrameworkCore --version 5.0.4` + + The `` element is added to the `Directory.Packages.props file`. + + ```xml + + ``` + + The `` element is added to the project file. + + ```xml + + ``` + ### Implicit restore [!INCLUDE[DotNet Restore Note](../../../includes/dotnet-restore-note.md)] diff --git a/docs/core/whats-new/snippets/dotnet-9/csharp/Program.cs b/docs/core/whats-new/snippets/dotnet-9/csharp/Program.cs index 7b9921056172e..abb62d82e2725 100644 --- a/docs/core/whats-new/snippets/dotnet-9/csharp/Program.cs +++ b/docs/core/whats-new/snippets/dotnet-9/csharp/Program.cs @@ -6,4 +6,5 @@ //Channels.RunIt(); //RegularExpressions.RunIt(); //Collections.RunIt(); -Diagnostics.RunIt(); +//Diagnostics.RunIt(); +Tensors.RunIt(); diff --git a/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj b/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj index a22789e316a8c..1157509149b0c 100644 --- a/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj +++ b/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj @@ -8,11 +8,11 @@ - + - - + + diff --git a/docs/core/whats-new/snippets/dotnet-9/csharp/Tensors.cs b/docs/core/whats-new/snippets/dotnet-9/csharp/Tensors.cs index f036f4da2d1fa..17da61065108b 100644 --- a/docs/core/whats-new/snippets/dotnet-9/csharp/Tensors.cs +++ b/docs/core/whats-new/snippets/dotnet-9/csharp/Tensors.cs @@ -7,13 +7,13 @@ public static void RunIt() { // // Create a tensor (1 x 3). - var t0 = Tensor.Create([1, 2, 3], [1, 3]); // [[1, 2, 3]] + Tensor t0 = Tensor.Create([1, 2, 3], [1, 3]); // [[1, 2, 3]] // Reshape tensor (3 x 1). - var t1 = t0.Reshape(3, 1); // [[1], [2], [3]] + Tensor t1 = t0.Reshape(3, 1); // [[1], [2], [3]] // Slice tensor (2 x 1). - var t2 = t1.Slice(1.., ..); // [[2], [3]] + Tensor t2 = t1.Slice(1.., ..); // [[2], [3]] // Broadcast tensor (3 x 1) -> (3 x 3). // [ @@ -21,31 +21,30 @@ public static void RunIt() // [ 2, 2, 2], // [ 3, 3, 3] // ] - var t3 = Tensor.Broadcast(t1, [3, 3]); + var t3 = Tensor.Broadcast(t1, [3, 3]); // Math operations. var t4 = Tensor.Add(t0, 1); // [[2, 3, 4]] - var t5 = Tensor.Add(t0, t0); // [[2, 4, 6]] + var t5 = Tensor.Add(t0.AsReadOnlyTensorSpan(), t0); // [[2, 4, 6]] var t6 = Tensor.Subtract(t0, 1); // [[0, 1, 2]] - var t7 = Tensor.Subtract(t0, t0); // [[0, 0, 0]] + var t7 = Tensor.Subtract(t0.AsReadOnlyTensorSpan(), t0); // [[0, 0, 0]] var t8 = Tensor.Multiply(t0, 2); // [[2, 4, 6]] - var t9 = Tensor.Multiply(t0, t0); // [[1, 4, 9]] + var t9 = Tensor.Multiply(t0.AsReadOnlyTensorSpan(), t0); // [[1, 4, 9]] var t10 = Tensor.Divide(t0, 2); // [[0.5, 1, 1.5]] - var t11 = Tensor.Divide(t0, t0); // [[1, 1, 1]] + var t11 = Tensor.Divide(t0.AsReadOnlyTensorSpan(), t0); // [[1, 1, 1]] // // ReadOnlySpan vector1 = [1, 2, 3]; ReadOnlySpan vector2 = [4, 5, 6]; Console.WriteLine(TensorPrimitives.CosineSimilarity(vector1, vector2)); - // Prints 0.9746318 ReadOnlySpan vector3 = [1, 2, 3]; ReadOnlySpan vector4 = [4, 5, 6]; Console.WriteLine(TensorPrimitives.CosineSimilarity(vector3, vector4)); - // Prints 0.9746318461970762 + // } } diff --git a/docs/csharp/programming-guide/strings/index.md b/docs/csharp/programming-guide/strings/index.md index 9d82e74d3f45c..04825ff9c7833 100644 --- a/docs/csharp/programming-guide/strings/index.md +++ b/docs/csharp/programming-guide/strings/index.md @@ -9,7 +9,7 @@ ms.assetid: 21580405-cb25-4541-89d5-037846a38b07 --- # Strings and string literals -A string is an object of type whose value is text. Internally, the text is stored as a sequential read-only collection of objects. There's no null-terminating character at the end of a C# string; therefore a C# string can contain any number of embedded null characters ('\0'). The property of a string represents the number of `Char` objects it contains, not the number of Unicode characters. To access the individual Unicode code points in a string, use the object. +A string is an object of type whose value is text. Internally, the text is stored as a sequential read-only collection of objects. The property of a string represents the number of `Char` objects it contains, not the number of Unicode characters. To access the individual Unicode code points in a string, use the object. ## string vs. System.String diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2254.md b/docs/fundamentals/code-analysis/quality-rules/ca2254.md index d6c52c80fe675..5c83b8d97e489 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2254.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2254.md @@ -64,6 +64,8 @@ Update the message template to be a constant expression. If you're using values logger.Warning("Person {FirstName} {LastName} encountered an issue", firstName, lastName); ``` +For usage examples, see the method. + ## When to suppress errors It's safe to suppress a warning from this rule if your use case doesn't require structured logging. It's also safe to suppress this rule if your log message template is defined in a resource file. diff --git a/docs/orleans/host/configuration-guide/adonet-configuration.md b/docs/orleans/host/configuration-guide/adonet-configuration.md index 4daea39c0b167..7965b153f543f 100644 --- a/docs/orleans/host/configuration-guide/adonet-configuration.md +++ b/docs/orleans/host/configuration-guide/adonet-configuration.md @@ -30,11 +30,13 @@ The following sections contain links to SQL scripts to configure your database a | Database | Script | NuGet package| ADO.NET invariant | |--|--|--|--| -| SQL Server | [SQLServer-Persistence.sql](https://github.com/dotnet/orleans/blob/main/src/AdoNet/Orleans.Persistence.AdoNet/SQLServer-Persistence.sql) | [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/) | `System.Data.SqlClient` | +| SQL Server* | [SQLServer-Persistence.sql](https://github.com/dotnet/orleans/blob/main/src/AdoNet/Orleans.Persistence.AdoNet/SQLServer-Persistence.sql) | [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/) | `System.Data.SqlClient` | | MySQL / MariaDB | [MySQL-Persistence.sql](https://github.com/dotnet/orleans/blob/main/src/AdoNet/Orleans.Persistence.AdoNet/MySQL-Persistence.sql) | [MySql.Data](https://www.nuget.org/packages/MySql.Data/) | `MySql.Data.MySqlClient` | | PostgreSQL | [PostgreSQL-Persistence.sql](https://github.com/dotnet/orleans/blob/main/src/AdoNet/Orleans.Persistence.AdoNet/PostgreSQL-Persistence.sql) | [Npgsql](https://www.nuget.org/packages/Npgsql/) | `Npgsql` | | Oracle | [Oracle-Persistence.sql](https://github.com/dotnet/orleans/blob/main/src/AdoNet/Orleans.Persistence.AdoNet/Oracle-Persistence.sql) | [ODP.net](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) | `Oracle.DataAccess.Client` | +\* If you're using Orleans v3.x use this script template: + ## Reminders | Database | Script | NuGet package| ADO.NET invariant | diff --git a/docs/orleans/streaming/streams-programming-apis.md b/docs/orleans/streaming/streams-programming-apis.md index b68ea443b3df4..862cfaa33d2e3 100644 --- a/docs/orleans/streaming/streams-programming-apis.md +++ b/docs/orleans/streaming/streams-programming-apis.md @@ -164,20 +164,24 @@ Below are the guidelines on how to write the subscription logic for various case **Implicit subscriptions:** -For implicit subscriptions, the grain needs to subscribe to attach the processing logic. This should be done in the grain's `OnActivateAsync` method. The grain should simply execute `await stream.SubscribeAsync(OnNext ...)` in its `OnActivateAsync` method. That will cause this particular activation to attach the `OnNext` function to process that stream. The grain can optionally specify the `StreamSequenceToken` as an argument to `SubscribeAsync`, which will cause this implicit subscription to start consuming from that token. There is never a need for an implicit subscription to call `ResumeAsync`. +For implicit subscriptions, the grain still needs to subscribe to attach the processing logic. This can be done in the consumer grain by implementing the `IStreamSubscriptionObserver` and `IAsyncObserver` interfaces, allowing the grain to activate separately from subscribing. To subscribe to the stream, the grain creates a handle and calls `await handle.ResumeAsync(this)` in its `OnSubscribed(...)` method. + +To process messages, the `IAsyncObserver.OnNextAsync(...)` method is implemented to receive stream data and a sequence token. Alternatively, the `ResumeAsync` method may take a set of delegates representing the methods of the `IAsyncObserver` interface, `onNextAsync`, `onErrorAsync`, and `onCompletedAsync`. :::zone target="docs" pivot="orleans-7-0" ```csharp -public override async Task OnActivateAsync(CancellationToken cancellationToken) +public Task OnNextAsync(string item, StreamSequenceToken? token = null) { - var streamProvider = this.GetStreamProvider(PROVIDER_NAME); - var streamId = StreamId.Create("MyStreamNamespace", this.GetPrimaryKey()); - var stream = streamProvider.GetStream(streamId); + _logger.LogInformation($"Received an item from the stream: {item}"); +} - await stream.SubscribeAsync(OnNextAsync); +public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) +{ + var handle = handleFactory.Create(); + await handle.ResumeAsync(this); } ``` diff --git a/docs/standard/frameworks.md b/docs/standard/frameworks.md index 79ab42ae0038f..763a19ec13b2c 100644 --- a/docs/standard/frameworks.md +++ b/docs/standard/frameworks.md @@ -65,10 +65,10 @@ The following table shows the compatibility of the .NET 5+ TFMs. | net5.0-windows | netcoreapp1..3.1 (plus everything else inherited from `net5.0`) | | net6.0 | (Subsequent version of `net5.0`) | | net6.0-android | `xamarin.android` (plus everything else inherited from `net6.0`) | -| net6.0-ios | `xamarin.ios` (plus everything else inherited from `net6.0`) | -| net6.0-maccatalyst | `xamarin.ios` (plus everything else inherited from `net6.0`) | -| net6.0-macos | `xamarin.mac` (plus everything else inherited from `net6.0`) | -| net6.0-tvos | `xamarin.tvos` (plus everything else inherited from `net6.0`) | +| net6.0-ios | Everything inherited from `net6.0` | +| net6.0-maccatalyst | Everything inherited from `net6.0` | +| net6.0-macos | Everything inherited from `net6.0` | +| net6.0-tvos | Everything inherited from `net6.0` | | net6.0-windows | (Subsequent version of `net5.0-windows`) | | net7.0 | (Subsequent version of `net6.0`) | | net7.0-android | (Subsequent version of `net6.0-android`) | diff --git a/docs/visual-basic/programming-guide/language-features/data-types/tuples.md b/docs/visual-basic/programming-guide/language-features/data-types/tuples.md index d8157eef2a551..dbf590a58ee5c 100644 --- a/docs/visual-basic/programming-guide/language-features/data-types/tuples.md +++ b/docs/visual-basic/programming-guide/language-features/data-types/tuples.md @@ -146,11 +146,11 @@ A method can return only a single value. Frequently, though, you'd like a method - You can use a tuple, which provides a lightweight solution to retrieving multiple return values. -For example, the **TryParse** methods in .NET return a `Boolean` value that indicates whether the parsing operation succeeded. The result of the parsing operation is returned in a variable passed by reference to the method. Normally, a call to a parsing method such as looks like the following: +For example, the **TryParse** methods in .NET return a `Boolean` value that indicates whether the parsing operation succeeded. The result of the parsing operation is returned in a variable passed by reference to the method. Normally, a call to a parsing method such as [Integer.TryParse](xref:System.Int32.TryParse%2A) looks like the following: :::code language="vb" source="../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/tuples/tuple-returns.vb" id="StandardMethodCall"::: -We can return a tuple from the parsing operation if we wrap the call to the method in our own method. In the following example, `NumericLibrary.ParseInteger` calls the method and returns a named tuple with two elements. +We can return a tuple from the parsing operation if we wrap the call to the [Integer.TryParse](xref:System.Int32.TryParse%2A) method in our own method. In the following example, `NumericLibrary.ParseInteger` calls the [Integer.TryParse](xref:System.Int32.TryParse%2A) method and returns a named tuple with two elements. :::code language="vb" source="../../../../../samples/snippets/visualbasic/programming-guide/language-features/data-types/tuples/tuple-returns.vb" id="ParseIntegerReturnsTuple":::