Search Results for

    Show / Hide Table of Contents

    Class ContractHelpers

    A collection of functions that help enforce contracts.

    Inheritance
    object
    ContractHelpers
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame
    Assembly: Flame.dll
    Syntax
    public static class ContractHelpers

    Methods

    | Edit this page View Source

    Assert(bool)

    Asserts that a condition must always hold.

    Declaration
    public static void Assert(bool condition)
    Parameters
    Type Name Description
    bool condition

    A condition that must be true.

    | Edit this page View Source

    Assert(bool, string)

    Asserts that a condition must always hold.

    Declaration
    public static void Assert(bool condition, string message)
    Parameters
    Type Name Description
    bool condition

    A condition that must be true.

    string message

    The error message to print if the condition is false.

    | Edit this page View Source

    CheckPositive(int, string)

    Checks that an integer value is positive, i.e., it is greater than or equal to zero.

    Declaration
    public static void CheckPositive(int value, string valueName)
    Parameters
    Type Name Description
    int value

    The value to check.

    string valueName

    The name of the value to check.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX