Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Add new rule C#-FriendlyAsyncOverload #586

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

parhamsaremi
Copy link
Contributor

Fixes #517

NOTE: this PR supersedes an older PR

@parhamsaremi parhamsaremi changed the title Add new rule C#-FriendlyAsyncOverload Draft: Add new rule C#-FriendlyAsyncOverload Nov 21, 2022
@parhamsaremi parhamsaremi changed the title Draft: Add new rule C#-FriendlyAsyncOverload DRAFT: Add new rule C#-FriendlyAsyncOverload Nov 21, 2022
@knocte
Copy link
Collaborator

knocte commented Apr 16, 2023

This PR needs to change because we're going to change the convention: instead of having Foo(): Async<'T> for the F# method and FooAsync(): Task<'T> for the C# one, we're gonna have AsyncFoo(): Async<'T>, FooAsync(): Task<'T>, and Foo(): 'T for the synchronous version. This conclusion comes from a debate between me and Afshin in this PR: nblockchain/NOnion#56

@parhamsaremi parhamsaremi force-pushed the fix-CSharpFriendlyAsyncOverloads-conflicts branch 3 times, most recently from 0a6261e to 70d721f Compare May 4, 2023 08:22
@Thorium
Copy link
Member

Thorium commented Nov 18, 2023

Not all the libraries are meant for C# use. For example type-providers, they just don't work in C#.

@knocte
Copy link
Collaborator

knocte commented Dec 29, 2023

Not all the libraries are meant for C# use. For example type-providers, they just don't work in C#.

Good point, that's why this rule won't be enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Best practice around naming asynchronous methods/functions
4 participants