Search Results for

    Show / Hide Table of Contents

    Class AllowInstancesAttribute

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

    Inheritance
    System.Object
    System.Attribute
    AssertionAttribute
    AllowInstancesAttribute
    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 AllowInstancesAttribute : AssertionAttribute
    Remarks

    This attribute can be applied to methods to define that 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
    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.

    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.

    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.

    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.

    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