Constructor MaxAllocationsAttribute
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.
Declaration
public MaxAllocationsAttribute(Type type, int allocationsCount)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | System.Type of the instances that should be checked. |
System.Int32 | allocationsCount | Defines the maximum number of allocations that should be performed by the target method. |
Remarks
For more information see AssertionsDefinition.MaxAllocations and AssertionAttribute.
MaxAllocationsAttribute(Type[], Int32)
Declaration
public MaxAllocationsAttribute(Type[] types, int allocationsCount)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | types | An array containing the System.Types of the instances that should be checked. |
System.Int32 | allocationsCount |
MaxAllocationsAttribute(String, Int32)
Declaration
public MaxAllocationsAttribute(string typeName, int allocationsCount)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | Type name of the instances that should be checked. |
System.Int32 | allocationsCount |
MaxAllocationsAttribute(String[], Int32)
Declaration
public MaxAllocationsAttribute(string[] typeNames, int allocationsCount)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | typeNames | An array containing the type names of the instances that should be checked. |
System.Int32 | allocationsCount |