Permalink
a5fea9f Aug 25, 2018
1 contributor

Users who have contributed to this file

44 lines (34 sloc) 1.03 KB

RCS1229: Use async/await when necessary

Property Value
Id RCS1229
Category Usage
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

Task<object> FooAsync()
{
    using (var service = CreateService()) // RCS1229
    {
        return service.GetAsync();
    }
}

Code with Fix

async Task<object> FooAsync()
{
    using (var service = CreateService())
    {
        return await service.GetAsync();
    }
}

See Also

(Generated with DotMarkdown)