forked from enlightenment/efl
csharp: Silence CA2000 in tests
Summary: These objects are expected to leave scope while alive. Ref T8423 Depends on D10671 Reviewers: brunobelo, felipealmeida, YOhoho Reviewed By: brunobelo Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8423 Differential Revision: https://phab.enlightenment.org/D10672
This commit is contained in:
parent
a0dd0b616a
commit
2272e21b3c
|
@ -17,6 +17,7 @@ using System;
|
|||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace TestSuite
|
||||
{
|
||||
|
@ -126,6 +127,7 @@ class TestEoInherit
|
|||
loop.Dispose();
|
||||
}
|
||||
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectBeforeLosingScope", Justification = "It is expected to lose scope.")]
|
||||
private static WeakReference CreateCollectableInherited()
|
||||
{
|
||||
return new WeakReference(new MyObject());
|
||||
|
|
|
@ -18,6 +18,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using EinaTestData;
|
||||
using static EinaTestData.BaseData;
|
||||
|
@ -108,6 +109,7 @@ class TestInheritance
|
|||
obj.Dispose();
|
||||
}
|
||||
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectBeforeLosingScope", Justification = "It is expected to lose scope.")]
|
||||
private static void CreateAndCheckInheritedObjects(out WeakReference parentWRef, out WeakReference childWRef)
|
||||
{
|
||||
var parent = new Inherit3Parent();
|
||||
|
|
Loading…
Reference in New Issue