Search Results for

    Show / Hide Table of Contents

    Constructor MaxNewInstancesAttribute

    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.

    Declaration
    public MaxNewInstancesAttribute(Type type, int instanceCount)
    Parameters
    Type Name Description
    System.Type type

    System.Type of the instances that should be checked.

    System.Int32 instanceCount

    Defines the maximum number of new instances that should exist after the target method has been executed.

    Remarks

    For more information see AssertionsDefinition.MaxNewInstances(Type, Boolean, Int32) and AssertionAttribute.

    MaxNewInstancesAttribute(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.

    Declaration
    public MaxNewInstancesAttribute(Type[] types, int instanceCount)
    Parameters
    Type Name Description
    System.Type[] types

    An array containing the System.Types of the instances that should be checked.

    System.Int32 instanceCount

    Defines the maximum number of new instances that should exist after the target method has been executed.

    Remarks

    For more information see AssertionsDefinition.MaxNewInstances(Type[], Boolean, Int32) and AssertionAttribute.

    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.

    Declaration
    public MaxNewInstancesAttribute(string typeName, int instanceCount)
    Parameters
    Type Name Description
    System.String typeName

    Type name of the instances that should be checked.

    System.Int32 instanceCount

    Defines the maximum number of new instances that should exist after the target method has been executed.

    Remarks

    For more information see AssertionsDefinition.MaxNewInstances(String, Boolean, Int32) and AssertionAttribute.

    MaxNewInstancesAttribute(String[], Int32)

    Initializes a new instance of MaxNewInstancesAttribute with the type names of the instances that should be checked and the maximum number of new instances allowed.

    Declaration
    public MaxNewInstancesAttribute(string[] typeNames, int instanceCount)
    Parameters
    Type Name Description
    System.String[] typeNames

    An array containing the type names of the instances that should be checked.

    System.Int32 instanceCount

    Defines the maximum number of new instances that should exist after the target method has been executed.

    Remarks

    For more information see AssertionsDefinition.MaxNewInstances(String[], Boolean, Int32) and AssertionAttribute.

    In This Article
    Back to top

    © Copyright 2002-2020. SciTech Software AB.
    For information about .NET Memory Profiler, see the product site at https://memprofiler.com