Class AllowInstancesAttribute
Indicates that 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 AllowInstancesAttribute : AssertionAttribute
Remarks
This attribute can be applied to methods to define that 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 |
---|---|
AllowInstancesAttribute(String) | Initializes a new instance of AllowInstancesAttribute with the type name of the instances that should be allowed when the target method has been executed. |
AllowInstancesAttribute(String[]) | Initializes a new instance of AllowInstancesAttribute with the type names of the instances that should be allowed when the target method has been executed. |
AllowInstancesAttribute(Type) | Initializes a new instance of AllowInstancesAttribute with the type of the instances that should be allowed when the target method has been executed. |
AllowInstancesAttribute(Type[]) | Initializes a new instance of AllowNewInstancesAttribute with the types of the instances that should be allowed when the target method has been executed. |