The MemAssertion type exposes the following members.

Methods

  Name Description
Public method Static member Assert(AssertionsDefinition)
Asserts that the memory usage since the last call to FastSnapShot()()()() or FullSnapShot()()()() meets the memory usage defined by the supplied AssertionsDefinition. Only instances created by the calling thread will be checked by this assertion.
Public method Static member Assert(AssertionsDefinition, AssertionsThread)
Asserts that the memory usage since the last call to FastSnapShot()()()() or FullSnapShot()()()() meets the memory usage defined by the supplied AssertionsDefinition.
Public method Static member Assert(MemSnapShot, AssertionsDefinition)
Asserts that the memory usage since the comparisonSnapshot meets the memory usage defined by the supplied AssertionsDefinition. Only instances created by the calling thread will be checked by this assertion.
Public method Static member Assert(MemSnapShot, AssertionsDefinition, AssertionsThread)
Asserts that the memory usage since the comparisonSnapshot meets the memory usage defined by the supplied AssertionsDefinition.
Public method Static member BeginAssertions
Begins an assertions session. An assertions session is used to reduce the number of garbage collections performed when doing memory assertions and to avoid memory side effects.
Public method Static member EndAssertions
Ends an assertions session previously started by a call to BeginAssertions()()()().
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Static member NoInstances(String)
This NoInstances assertion accepts a single type name. The type name can end with a '*' to allow all types starting with a common string to be matched. This can be used to include all types in a namespace (e.g. "System.Windows.Forms.*" will include all types in the System.Windows.Forms namespace).
Public method Static member NoInstances(array<String>[]()[][])
This NoInstances assertion accepts an array of type names to check. The type names can end with a '*' to allow all types starting with a common string to be matched. This can be used to include all types in a namespace (e.g. "System.Windows.Forms.*" will include all types in the System.Windows.Forms namespace).
Public method Static member NoInstances(Type)
This NoInstances assertion accepts a single Type. Subclasses will not be checked.
Public method Static member NoInstances(array<Type>[]()[][])
This NoInstances assertion accepts an array of Types to check. Subclasses will not be checked.
Public method Static member NoInstances(Type, Boolean)
This NoInstances assertion accepts a single Type and boolean parameter indicating whether subclasses should be included.
Public method Static member NoInstances(array<Type>[]()[][], Boolean)
This NoInstances assertion accepts an array of Types to check and a boolean parameter indicating whether subclasses should be included.
Public method Static member NoNewInstances()()()()
This NoNewInstances method will assert that no live instances, created by the calling thread, exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(String)
This NoNewInstances assertion will assert that no live instances of the type with the specified name exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(array<String>[]()[][])
This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(Type)
This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(array<Type>[]()[][])
This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(AssertionsThread)
This NoNewInstances assertion takes a single AssertionsThread parameter. It will assert that no live instances exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(MemSnapShot)
This NoNewInstances method will assert that no live instances, created by the calling thread, exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(String, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the type with the specified name exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(array<String>[]()[][], AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(Type, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(Type, Boolean)
This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(array<Type>[]()[][], AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(array<Type>[]()[][], Boolean)
This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()().
Public method Static member NoNewInstances(MemSnapShot, AssertionsThread)
This NoNewInstances method will assert that no live instances exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.

Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.

Public method Static member NoNewInstances(MemSnapShot, String)
This NoNewInstances assertion will assert that no live instances of the type with the specified name exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(MemSnapShot, array<String>[]()[][])
This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(MemSnapShot, Type)
This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(MemSnapShot, array<Type>[]()[][])
This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(Type, Boolean, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(array<Type>[]()[][], Boolean, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapShot()()()() or FullSnapShot()()()(). Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(MemSnapShot, String, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the type with the specified name exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.

Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.

Public method Static member NoNewInstances(MemSnapShot, Type, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.

Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.

Public method Static member NoNewInstances(MemSnapShot, Type, Boolean)
This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(MemSnapShot, array<Type>[]()[][], AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(MemSnapShot, array<Type>[]()[][], Boolean)
This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot.
Public method Static member NoNewInstances(MemSnapShot, Type, Boolean, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstances(MemSnapShot, array<Type>[]()[][], Boolean, AssertionsThread)
This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(String)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the specified type with the specified name.
Public method Static member NoNewInstancesExcept(array<String>[]()[][])
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the types with the specified names.
Public method Static member NoNewInstancesExcept(Type)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the specified Type.
Public method Static member NoNewInstancesExcept(array<Type>[]()[][])
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the specified Types.
Public method Static member NoNewInstancesExcept(String, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the type with the specified name. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(array<String>[]()[][], AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the types with the specified names. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(Type, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the specified Type. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(Type, Boolean)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the specified Type, or optionally one of its subclasses.
Public method Static member NoNewInstancesExcept(array<Type>[]()[][], AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the specified Types. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(array<Type>[]()[][], Boolean)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the specified Types, or optionally one of their subclasses.
Public method Static member NoNewInstancesExcept(MemSnapShot, String)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the type with the specified name.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<String>[]()[][])
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the types with specified names.
Public method Static member NoNewInstancesExcept(MemSnapShot, Type)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified Type.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<Type>[]()[][])
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified Types.
Public method Static member NoNewInstancesExcept(Type, Boolean, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of the specified Type, or optionally one of its subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(array<Type>[]()[][], Boolean, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the last call to FastSnapShot()()()() or FullSnapShot()()()(), are instances of one of the specified Types, or optionally one of their subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, String, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the type with the specified name. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<String>[]()[][], AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the types with the specified names. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, Type, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified Type. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, Type, Boolean)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified Type, or optionally one of its subclasses.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<Type>[]()[][], AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified Types. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<Type>[]()[][], Boolean)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified Types, or optionally one of their subclasses.
Public method Static member NoNewInstancesExcept(MemSnapShot, Type, Boolean, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified Type, or optionally one of its subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method Static member NoNewInstancesExcept(MemSnapShot, array<Type>[]()[][], Boolean, AssertionsThread)
This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified Types, or optionally one of their subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked.
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Events

  Name Description
Public event Static member AssertionFailed
Invoked when a memory assertion has failed.

See Also