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

Message in diagnostic for undisposed property is wrong #51

Closed dscopra closed 7 years ago

dscopra commented 7 years ago

Prerequisites

Description

When initializing a property that implements IDisposable, I got a diagnostic that tells: "Field is not disposed". But this is a property, not a field.

Source Code

public class SomeCode{
    public IDisposable Property { get; }

    public SomeCode() {
        Property = new MemoryStream();//wrong diagnostic
    }
}

Screenshot

image