Defines that no new instances of the specified types
should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
Overload List
| Name | Description | |
|---|---|---|
|
|
NoNewInstances()()()() |
Defines that no new instances should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(String) |
Defines that no new instances of the Types that matches the provided name
should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(array<String>[]()[][]) |
Defines that no new instances of Types that matches the provided names
should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(Type) |
Defines that no new instances of the provided type
should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(array<Type>[]()[][]) |
Defines that no new instances of the provided types should exist when this
definition is asserted using MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(TypeSet) |
Defines that no new instances of any type in the provided typeSet
should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(String, Boolean) |
Defines that no new instances of the Types that matches the provided name (and optionally
their subclasses) should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(array<String>[]()[][], Boolean) |
Defines that no new instances of Types that matches the provided names (and optionally
their subclasses) should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(Type, Boolean) |
Defines that no new instances of the provided type (and optionally
its subclasses) should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
NoNewInstances(array<Type>[]()[][], Boolean) |
Defines that no new instances of the provided types (and optionally
their subclasses) should exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
Remarks
Calling MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread)
using this AssertionsDefinition will fail if a new instance of any provided type exists, unless the type is also
included in a call to an AllowXXX or MaxXXX method.
Note
The AllowXXX (AllowInstances(TypeSet), AllowNewInstances(TypeSet)) and
MaxXXX (MaxInstances(TypeSet, Int32), MaxNewInstances(TypeSet, Int32),
MaxBytes(TypeSet, Int64), MaxNewBytes(TypeSet, Int64)) methods takes
precedence over the NoXXX (NoInstances(TypeSet), NoNewInstances(TypeSet)) methods.
For more information see AssertionsDefinition.