Class MaxAllocationsAttribute
Checks that no more than a specific number of allocations are performed by the target method.
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SciTech.NetMemProfiler
Assembly: SciTech.MemProfilerApi.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class MaxAllocationsAttribute : AssertionAttribute
Remarks
This attribute can be applied to methods to define that no more than a specific number of allocations should be performed by the target method.
For more information see AssertionsDefinition.MaxAllocations and AssertionAttribute.
Constructors
Name | Description |
---|---|
MaxAllocationsAttribute(String, Int32) | |
MaxAllocationsAttribute(String[], Int32) | |
MaxAllocationsAttribute(Type, Int32) | Initializes a new instance of MaxAllocationsAttribute with the type of the instances that should be checked and the maximum number of allocations allowed. |
MaxAllocationsAttribute(Type[], Int32) |
Properties
Name | Description |
---|---|
AllocationsCount | Gets a value indicating the maximum number of allocations that should be performed by the target method. |