Defines that instances of the specified types
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
Overload List
| Name | Description | |
|---|---|---|
|
|
AllowInstances(String) |
Defines that instances of Types that matches the provided name
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(array<String>[]()[][]) |
Defines that instances of Types that matches the provided names
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(Type) |
Defines that instances of the provided type
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(array<Type>[]()[][]) |
Defines that instances of the provided types
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(TypeSet) |
Defines that instances of any type in the provided typeSet
are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(String, Boolean) |
Defines that instances of Types that matches the provided name (and optionally
their subclasses) are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(array<String>[]()[][], Boolean) |
Defines that instances of Types that matches the provided names (and optionally
their subclasses) are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(Type, Boolean) |
Defines that instances of the provided type (and optionally
its subclasses) are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
AllowInstances(array<Type>[]()[][], Boolean) |
Defines that instances of the provided types (and optionally
their subclasses) are allowed to exist when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
Remarks
Including a type in a call to AllowInstances, will override instance restrictions defined
using a call to NoInstances(TypeSet) or NoNewInstances(TypeSet).
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.