Search Results for

    Show / Hide Table of Contents

    Class MaxBytesAttribute

    Checks that no more than a specific number of bytes exist after the target method has been executed.

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

    This attribute can be applied to methods to define that no more than a specific number of bytes should exist on the GC heap after the target method has been executed.

    For more information see AssertionsDefinition.MaxBytes(Type[], Boolean, Int64) and AssertionAttribute.

    Constructors

    Name Description
    MaxBytesAttribute(String, Int64)

    Initializes a new instance of MaxBytesAttribute with the type name of the instances that should be checked and the maximum number of bytes allowed.

    MaxBytesAttribute(String[], Int64)

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

    MaxBytesAttribute(Type, Int64)

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

    MaxBytesAttribute(Type[], Int64)

    Initializes a new instance of MaxBytesAttribute with the types of the instances that should be checked and the maximum number of new bytes allowed.

    Properties

    Name Description
    ByteCount

    Gets a value indicating the maximum number of bytes that should exist after 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