Constructor AllowNewInstancesAttribute
AllowNewInstancesAttribute()
Initializes a new instance of AllowNewInstancesAttribute which will allow new instances of all types.
Declaration
public AllowNewInstancesAttribute()
Remarks
For more information see AssertionsDefinition.AllowNewInstances(Type, Boolean) and AssertionAttribute.
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.
Declaration
public AllowNewInstancesAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | System.Type of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowNewInstances(Type, Boolean) and AssertionAttribute.
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.
Declaration
public AllowNewInstancesAttribute(Type[] types)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | types | An array containing the System.Types of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowNewInstances(Type[], Boolean) and AssertionAttribute.
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.
Declaration
public AllowNewInstancesAttribute(string typeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | Type name of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowNewInstances(String, Boolean) and AssertionAttribute.
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.
Declaration
public AllowNewInstancesAttribute(string[] typeNames)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | typeNames | An array containing the type names of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowNewInstances(String[], Boolean) and AssertionAttribute.