Defines that new instances of the specified types are allowed to exist when this definition is asserted using MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).

Overload List

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

See Also