Search Results for

    Show / Hide Table of Contents

    Method MaxAllocatedBytes

    MaxAllocatedBytes(TypeSet, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(TypeSet typeSet, long bytesCount)
    Parameters
    Type Name Description
    TypeSet typeSet

    A TypeSet containing the types of the allocations that should be checked.

    System.Int64 bytesCount

    Defines the maximum number of bytes that are allowed to be allocated of the specified types.

    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(Type[], Boolean, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(Type[] types, bool includeSubclasses, long bytesCount)
    Parameters
    Type Name Description
    System.Type[] types

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

    System.Boolean includeSubclasses

    Indicates whether instances of subclasses of the specified types should be checked.

    System.Int64 bytesCount
    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(Type[], Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(Type[] types, long bytesCount)
    Parameters
    Type Name Description
    System.Type[] types

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

    System.Int64 bytesCount

    Defines the maximum number of bytes that are allowed to be allocated of the specified types.

    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(Type, Boolean, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(Type type, bool includeSubclasses, long bytesCount)
    Parameters
    Type Name Description
    System.Type type

    The System.Type of the instances that should be checked.

    System.Boolean includeSubclasses

    Indicates whether instances of subclasses of the specified types should be checked.

    System.Int64 bytesCount
    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(Type, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(Type type, long bytesCount)
    Parameters
    Type Name Description
    System.Type type

    The System.Type of the instances that should be checked.

    System.Int64 bytesCount

    Defines the maximum number of bytes that are allowed to be allocated of the specified types.

    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(String[], Boolean, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(string[] typeNames, bool includeSubclasses, long bytesCount)
    Parameters
    Type Name Description
    System.String[] typeNames

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

    System.Boolean includeSubclasses

    Indicates whether instances of subclasses of the specified types should be checked.

    System.Int64 bytesCount
    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(String[], Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(string[] typeNames, long bytesCount)
    Parameters
    Type Name Description
    System.String[] typeNames

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

    System.Int64 bytesCount

    Defines the maximum number of bytes that are allowed to be allocated of the specified types.

    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(String, Boolean, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(string typeName, bool includeSubclasses, long bytesCount)
    Parameters
    Type Name Description
    System.String typeName

    The type name of the instances that should be checked.

    System.Boolean includeSubclasses

    Indicates whether instances of subclasses of the specified types should be checked.

    System.Int64 bytesCount
    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    MaxAllocatedBytes(String, Int64)

    Defines that no more than the specified number of bytes are allowed to be allocated of the provided types when this definition is asserted using MemAssertion.Assert.

    Declaration
    public AssertionsDefinition MaxAllocatedBytes(string typeName, long bytesCount)
    Parameters
    Type Name Description
    System.String typeName

    The type name of the instances that should be checked.

    System.Int64 bytesCount

    Defines the maximum number of bytes that are allowed to be allocated of the specified types.

    Returns
    Type Description
    AssertionsDefinition

    Returns this to allow definition calls to be chained.

    Remarks

    Calling MemAssertion.Assert using this AssertionsDefinition will allow up to bytesCount bytes to be allocated of the specified types. If more than bytesCount bytes are allocated, then calling MemAssertion.Assert using this AssertionsDefinition will fail.

    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