You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Test]publicvoidAddingNewDisposableToListOfObject(){vartestCode=@"namespace RoslynSandbox{ using System; using System.Collections.Generic; public sealed class C { private List<object> disposables = new List<object>(); public C() { this.disposables.Add(↓new Disposable()); } }}";AnalyzerAssert.Diagnostics(Analyzer,ExpectedDiagnostic,DisposableCode,testCode);}[Test]publicvoidAddingFileOpenReadToListOfObject(){vartestCode=@"namespace RoslynSandbox{ using System; using System.Collections.Generic; using System.IO; public sealed class C { private readonly List<object> streams = new List<object>(); public C() { streams.Add(↓File.OpenRead(string.Empty)); } }}";AnalyzerAssert.Diagnostics(Analyzer,ExpectedDiagnostic,testCode);}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: