We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12c6ff6 commit 7d07dbdCopy full SHA for 7d07dbd
1 file changed
IDisposableAnalyzers.Test/IDISP001DisposeCreatedTests/Valid.Ignore.cs
@@ -71,4 +71,34 @@ public C(IKernel kernel)
71
}";
72
RoslynAssert.Valid(Analyzer, code);
73
}
74
+
75
+ [Test]
76
+ public static void ReactiveUiDisposeWith()
77
+ {
78
+ const string Code = """
79
+ namespace N
80
81
+ using System;
82
+ using System.Reactive.Disposables;
83
+ using ReactiveUI;
84
85
+ public sealed class C : IDisposable
86
87
+ private readonly CompositeDisposable _disposables = new();
88
89
+ public C()
90
91
+ var command = ReactiveCommand.Create(() => { Console.WriteLine("Hi"); }).DisposeWith(_disposables);
92
+ }
93
94
+ public void Dispose()
95
96
+ _disposables.Dispose();
97
98
99
100
+ """;
101
102
+ RoslynAssert.Valid(Analyzer, Code);
103
104
0 commit comments