Method NoInstances
NoInstances(Type)
This NoInstances assertion accepts a single System.Type. Subclasses will not be checked.
Declaration
[Obsolete("Use MemProfiler.Assert with an AssertionsDefinition instead.")]
public static bool NoInstances(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Identifies the System.Type of the instances to check. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |
NoInstances(Type, Boolean)
This NoInstances assertion accepts a single System.Type and boolean parameter indicating whether subclasses should be included.
Declaration
public static bool NoInstances(Type type, bool includeSubClasses)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Identifies the base System.Type of the instances to check. |
System.Boolean | includeSubClasses | Indicates whether instances of subclasses of the specified type should also be checked. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |
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).
Declaration
public static bool NoInstances(string type)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Identifies the type of the instances to check. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |
NoInstances(Type[])
This NoInstances assertion accepts an array of System.Types to check. Subclasses will not be checked.
Declaration
public static bool NoInstances(Type[] types)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | types | Identifies the System.Types of the instances to check. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |
NoInstances(Type[], Boolean)
This NoInstances assertion accepts an array of System.Types to check and a boolean parameter indicating whether subclasses should be included.
Declaration
public static bool NoInstances(Type[] types, bool includeSubclasses)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | types | Identifies the base System.Types of the instances to check. |
System.Boolean | includeSubclasses | Indicates whether instances of subclasses of the specified types should also be checked. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |
NoInstances(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).
Declaration
public static bool NoInstances(string[] types)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | types | Identifies the System.Types of the instances to check. |
Returns
Type | Description |
---|---|
System.Boolean | If the process is being profiled,
If this process is not being profiled, |