Search Results for

    Show / Hide Table of Contents

    Class AllowNewInstancesAttribute

    Indicates that new instances of the specified types are allowed to exist after the target method has been executed.

    Inheritance
    System.Object
    System.Attribute
    AssertionAttribute
    AllowNewInstancesAttribute
    Inherited Members
    AssertionAttribute.Type
    AssertionAttribute.GetTypes()
    AssertionAttribute.TypeName
    AssertionAttribute.GetTypeNames()
    AssertionAttribute.IncludeSubclasses
    System.Attribute.Equals(System.Object)
    System.Attribute.GetHashCode()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: SciTech.NetMemProfiler
    Assembly: SciTech.MemProfilerApi.dll
    Syntax
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public sealed class AllowNewInstancesAttribute : AssertionAttribute
    Remarks

    This attribute can be applied to methods to define that new instances of the specified types are allowed to exist after the method has been executed. This will override instance restrictions applied using NoInstancesAttribute or NoNewInstancesAttribute. For more information see AssertionsDefinition.AllowInstances(Type[], Boolean) and AssertionAttribute.

    Constructors

    Name Description
    AllowNewInstancesAttribute()

    Initializes a new instance of AllowNewInstancesAttribute which will allow new instances of all types.

    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.

    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.

    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.

    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.

    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