Method Assert
Assert(MemSnapshot, Nullable<AssertionsThread>)
Asserts that the memory usage since the comparisonSnapshot
meets the memory usage
defined by this AssertionsDefinition. This is equivalent to calling the MemAssertion.Assert
method.
Declaration
public bool Assert(MemSnapshot comparisonSnapshot, AssertionsThread? assertionsThread = default(AssertionsThread? ))
Parameters
Type | Name | Description |
---|---|---|
MemSnapshot | comparisonSnapshot | Identifies the snapshot to use as the comparison snapshot. Instances that did not exist at the time of the comparison snapshot, are considered to be new instances. |
System.Nullable<AssertionsThread> | assertionsThread | Indicates whether instances of all threads should be checked,
or only instances created by the calling thread. If this parameter is If the is not specified and this definition was created using MemAssertion.BeginAssertionsDefinition,
the noteThis parameter does not affect allocation assertions (AssertionsDefinition.MaxAllocations and AssertionsDefinition.MaxAllocatedBytes). Allocations for all threads are always considered for allocation assertions. |
Returns
Type | Description |
---|---|
System.Boolean | If the current process is being profiled,
If the current process is not being profiled, no assertion is performed and |
Assert(Nullable<AssertionsThread>)
Asserts that the memory usage since the comparisonSnapshot
meets the memory usage
defined by this AssertionsDefinition. This is equivalent to calling the MemAssertion.Assert
method.
Declaration
public bool Assert(AssertionsThread? assertionsThread = default(AssertionsThread? ))
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<AssertionsThread> | assertionsThread |
Returns
Type | Description |
---|---|
System.Boolean | If the current process is being profiled,
If the current process is not being profiled, no assertion is performed and |