Constructor AllowInstancesAttribute
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.
Declaration
public AllowInstancesAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | System.Type of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowInstances(Type, Boolean) and AssertionAttribute.
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.
Declaration
public AllowInstancesAttribute(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.AllowInstances(Type[], Boolean) and AssertionAttribute.
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.
Declaration
public AllowInstancesAttribute(string typeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | Type name of the instances that should be allowed. |
Remarks
For more information see AssertionsDefinition.AllowInstances(String, Boolean) and AssertionAttribute.
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.
Declaration
public AllowInstancesAttribute(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.AllowInstances(String[], Boolean) and AssertionAttribute.