AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

CancellationToken in ISingleClientProxy.InvokeAsync is not optional

Open SLjavad opened this issue 2 years ago • 8 comments

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.

  • ID: 1387f556-b4b7-70f9-5bd0-f0bccc597689
  • Version Independent ID: fb016cdc-d281-6b5b-7466-2c718e7274b4
  • Content: Use hubs in ASP.NET Core SignalR
  • Content Source: aspnetcore/signalr/hubs.md
  • Product: aspnet-core
  • Technology: aspnetcore-signalr
  • GitHub Login: @bradygaster
  • Microsoft Alias: bradyg

Associated WorkItem - 65762

SLjavad avatar Jan 02 '23 12:01 SLjavad

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

Rick-Anderson avatar Jan 02 '23 18:01 Rick-Anderson

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

BrennanConroy avatar Jan 03 '23 17:01 BrennanConroy

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 avatar Feb 23 '23 18:02 wadepickett

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.

wadepickett avatar Sep 21 '23 03:09 wadepickett

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

Alerinos avatar Mar 07 '24 23:03 Alerinos

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

guardrex avatar Mar 07 '24 23:03 guardrex

Assigned to this sprint.

wadepickett avatar Mar 08 '24 00:03 wadepickett

Higher priority SFI work to hit, changing sprint

wadepickett avatar Oct 01 '24 19:10 wadepickett