Class AllowNewInstancesAttribute
Indicates that new instances of the specified types are allowed to exist after the target method has been executed.
Inherited Members
Namespace: SciTech.NetMemProfiler
Assembly: SciTech.MemProfilerApi.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class AllowNewInstancesAttribute : AssertionAttribute
Remarks
This attribute can be applied to methods to define that new instances of the specified types are allowed to exist after the method has been executed. This will override instance restrictions applied using NoInstancesAttribute or NoNewInstancesAttribute. For more information see AssertionsDefinition.AllowInstances(Type[], Boolean) and AssertionAttribute.
Constructors
Name | Description |
---|---|
AllowNewInstancesAttribute() | Initializes a new instance of AllowNewInstancesAttribute which will allow new instances of all types. |
AllowNewInstancesAttribute(String) | Initializes a new instance of AllowNewInstancesAttribute with the type name of the instances that should be allowed when the target method has been executed. |
AllowNewInstancesAttribute(String[]) | Initializes a new instance of AllowNewInstancesAttribute with the type names of the instances that should be allowed when the target method has been executed. |
AllowNewInstancesAttribute(Type) | Initializes a new instance of AllowNewInstancesAttribute with the type of the instances that should be allowed when the target method has been executed. |
AllowNewInstancesAttribute(Type[]) | Initializes a new instance of AllowNewInstancesAttribute with the types of the instances that should be allowed when the target method has been executed. |