dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.28k forks source link

CancellationToken in ISingleClientProxy.InvokeAsync is not optional #27996

Open SLjavad opened 1 year ago

SLjavad commented 1 year ago

the CancellationToken parameter in InvokeAsync function is optional in Client Result section of document. but it's not optional in real code

image

document :

image

please fix it


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 65762

Rick-Anderson commented 1 year ago

ClientProxyExtensions.InvokeAsync shows it's required on each overload. @wadepickett move these embedded snippets to projects.

BrennanConroy commented 1 year ago

And don't use default or new CancellationToken(false) or CancellationToken.None in the docs.

wadepickett commented 1 year ago

Related: #28459 : Use hubs in SignalR: Move all code examples to app project vers 7.0

Related discussion I need to remember to review on dotnet/aspnetcore (development) 11542 "CancellationToken in the hub method signature is only supported for Server to client streaming currently."

wadepickett commented 1 year ago

Related to PR #dotnet/AspNetCore.Docs.Samples/pull/138, which is where I got stuck and this unfortunately sat for so long since I was having trouble getting a workable app sample together due to lack of experience with it. I will get back to it.

Alerinos commented 8 months ago

This problem still exists and the documentation is misleading. I lost 30 minutes to find the problem before I found this thread here. If the problem is not fixed it is worth mentioning in the documentation. cc: @guardrex

guardrex commented 8 months ago

@Alerinos ... I only work on the Blazor docs for the most part. @wadepickett is handling this issue.

wadepickett commented 8 months ago

Assigned to this sprint.

wadepickett commented 1 month ago

Higher priority SFI work to hit, changing sprint