Defines that no more than the specified number of bytes are allowed to be used by live instances
of the provided types when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
Overload List
| Name | Description | |
|---|---|---|
|
|
MaxBytes(String, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
Types that matches the provided name
when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(array<String>[]()[][], Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
Types that matches the provided names
when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(Type, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
the provided type
when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(array<Type>[]()[][], Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
the provided types when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(TypeSet, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances
of any type in the provided typeSet when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(String, Boolean, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
Types that matches the provided name
(and optionally their subclasses) when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(array<String>[]()[][], Boolean, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
Types that matches the provided names
(and optionally their subclasses) when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(Type, Boolean, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
the provided type (and optionally its subclasses)
when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
|
|
MaxBytes(array<Type>[]()[][], Boolean, Int64) |
Defines that no more than a specified number of bytes are allowed to be used by live instances of
the provided types (and optionally their subclasses)
when this definition is asserted using
MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).
|
Remarks
Calling MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread)
using this AssertionsDefinition will allow up to byteCount bytes to be used by live instances
of the specified types. If more than byteCount bytes are used by live instances, then
calling MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread)
using this AssertionsDefinition will fail.
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.