Show / Hide Table of Contents

    Class ContractHelpers

    A collection of functions that help enforce contracts.

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

    Methods

    | Improve this Doc View Source

    Assert(Boolean)

    Asserts that a condition must always hold.

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

    A condition that must be true.

    | Improve this Doc View Source

    Assert(Boolean, String)

    Asserts that a condition must always hold.

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

    A condition that must be true.

    System.String message

    The error message to print if the condition is false.

    | Improve this Doc View Source

    CheckPositive(Int32, 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
    System.Int32 value

    The value to check.

    System.String valueName

    The name of the value to check.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX