The MaxNewInstancesAttribute type exposes the following members.

Constructors

  Name Description
Public method MaxNewInstancesAttribute(String, Int32)
Initializes a new instance of MaxNewInstancesAttribute with the type name of the instances that should be checked and the maximum number of new instances allowed.
Public method MaxNewInstancesAttribute(array<String>[]()[][], Int32)
Initializes a new instance of MaxNewInstancesAttribute with the type namess of the instances that should be checked and the maximum number of new instances allowed.
Public method MaxNewInstancesAttribute(Type, Int32)
Initializes a new instance of MaxNewInstancesAttribute with the type of the instances that should be checked and the maximum number of new instances allowed.
Public method MaxNewInstancesAttribute(array<Type>[]()[][], Int32)
Initializes a new instance of MaxNewInstancesAttribute with the types of the instances that should be checked and the maximum number of new instances allowed.

Methods

  Name Description
Public method Equals
Returns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Returns the hash code for this instance.
(Inherited from Attribute.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method GetTypeNames
Gets a string array containing the type names of the instances that should be checked when the target method has been executed.
(Inherited from AssertionAttribute.)
Public method GetTypes
Gets the Types of the instances that should be checked when the target method has been executed.
(Inherited from AssertionAttribute.)
Public method IsDefaultAttribute
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute.)
Public method Match
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  Name Description
Public property IncludeSubclasses
Gets or sets a value indicating whether instances of all subclasses of the specified types should be checked when the target method has been executed.
(Inherited from AssertionAttribute.)
Public property InstanceCount
Gets a value indicating the maximum number of new instances that should exist after the target method has been executed.
Public property Type
Gets the Type of the instances that should be checked when the target method has been executed.
(Inherited from AssertionAttribute.)
Public property TypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.)
Public property TypeName
Gets the type name of the instances that should be checked when the target method has been executed.
(Inherited from AssertionAttribute.)

See Also