BADF00D / DisposableFixer

This is a Visual Studio Extension and NuGet package that should identify and fix problems as memleaks while using IDisposables.
Other
35 stars 7 forks source link

Support for await #31

Closed BADF00D closed 7 years ago

BADF00D commented 7 years ago

This code snipped should yield an error:

using System.IO;
using System.Threading.Tasks;
namespace DisFixerTest.Async
{
    class AsyncFileStream
    {
        public async Task<bool> Data()
        {
            var stream = await FileAsync.OpenReadAsync();

            return false;
        }
        public class FileAsync
        {
            public static async Task<MemoryStream> OpenReadAsync()
            {
                var memStream = new MemoryStream();

                return memStream;
            }
        }
    }
}