Add explicit discards to all value returning expressions
このコミットが含まれているのは:
1 親
38adbe6087
コミット
9343ac7f7b
47ファイル変更
+144
-144
検索条件に一致するファイルはありません
@@ -18,11 +18,11 @@ public class NativeObjectTests
|
||||
|
||||
Assert.IsTrue(obj.IsDisposed);
|
||||
|
||||
using var _ = obj.TryGetReferenceTrackingLease(out bool leaseTaken);
|
||||
using var lease0 = obj.TryGetReferenceTrackingLease(out bool leaseTaken);
|
||||
|
||||
Assert.IsFalse(leaseTaken);
|
||||
|
||||
Assert.ThrowsException<ObjectDisposedException>(() => obj.GetReferenceTrackingLease());
|
||||
_ = Assert.ThrowsException<ObjectDisposedException>(() => obj.GetReferenceTrackingLease());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -85,7 +85,7 @@ public class NativeObjectTests
|
||||
{
|
||||
DisposableObject obj = new();
|
||||
|
||||
Parallel.For(0, 2048, i =>
|
||||
_ = Parallel.For(0, 2048, i =>
|
||||
{
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public class NativeObjectTests
|
||||
{
|
||||
DisposableObject obj = new();
|
||||
|
||||
Parallel.For(0, 2048, i =>
|
||||
_ = Parallel.For(0, 2048, i =>
|
||||
{
|
||||
bool isDisposed = false;
|
||||
|
||||
@@ -137,7 +137,7 @@ public class NativeObjectTests
|
||||
|
||||
var outstandingLease = obj.GetReferenceTrackingLease();
|
||||
|
||||
Parallel.For(0, 2048, i =>
|
||||
_ = Parallel.For(0, 2048, i =>
|
||||
{
|
||||
bool isDisposed = false;
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする