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

Async methods should be named with the Async suffix #844

Closed
ghost opened this issue Jul 20, 2017 · 6 comments
Closed

Async methods should be named with the Async suffix #844

ghost opened this issue Jul 20, 2017 · 6 comments
Assignees
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Can Close Out Soon Work relating to this issue has been completed. XAML issue Issue relates to the XAML in generated projects.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 20, 2017

I've created a new project with the Windows Template Studio. However, the async methods aren't named like that. Async methods should always use the Async suffix wherever possible.

This is wrong:

public class FirstRunDisplayService
{
    internal static async Task ShowIfAppropriate()
    {
        ...
    }
}

This is the recommended way to go:

public class FirstRunDisplayService
{
    internal static async Task ShowIfAppropriateAsync()
    {
        ...
    }
}
@crutkas
Copy link
Member

crutkas commented Jul 20, 2017

100% agree. We can do a hotfix on this.

@crutkas crutkas added this to the 1.2 milestone Jul 20, 2017
@crutkas crutkas added bug The issue relates to the wizard not working or a problem with the generated code. XAML issue Issue relates to the XAML in generated projects. labels Jul 20, 2017
@crutkas
Copy link
Member

crutkas commented Jul 20, 2017

/cc @mrlacey

@mrlacey
Copy link
Collaborator

mrlacey commented Jul 20, 2017

There are exceptions where a method shouldn't always have this suffix but it is a common convention.
Surprisingly not covered by our coding conventions.

moving to v1.3 milestone as 1.2 has shipped and I don't think this is worth a hotfix

@mrlacey mrlacey modified the milestones: 1.3, 1.2 Jul 20, 2017
@mrlacey
Copy link
Collaborator

mrlacey commented Jul 20, 2017

Ok, @crutkas just seen you want this for a hotfix. changing it back.

@crutkas
Copy link
Member

crutkas commented Jul 20, 2017

Lets hot fix, we already have one going out the door.

@crutkas
Copy link
Member

crutkas commented Jul 21, 2017

this fix is now in production. Thanks @jlnostr for making us aware.

@crutkas crutkas closed this as completed Jul 21, 2017
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Can Close Out Soon Work relating to this issue has been completed. XAML issue Issue relates to the XAML in generated projects.
Projects
None yet
Development

No branches or pull requests

2 participants