Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 829 Bytes

RCS1229.md

File metadata and controls

41 lines (31 loc) · 829 Bytes

RCS1229: Use async/await when necessary

Property Value
Id RCS1229
Category Usage
Severity Info

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)