Automata Docs Automata Docs
Automata Docs Automata Docs

Search Results for

    Edit this page

    Class Contract

    Asserts conditions and throws exceptions.

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

    Methods

    | Edit this page View Source

    ShouldBeGreaterThanOrEqual(int, int, string)

    Asserts value is greater than or equal to other.

    Declaration
    public static int ShouldBeGreaterThanOrEqual(this int value, int other, string paramName = "")
    Parameters
    Type Name Description
    int value

    Value to validate.

    int other

    Value to compare against.

    string paramName

    Captured automatically.

    Returns
    Type Description
    int

    value iff value is greater than or equal to other.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown iffvalue is less than other.

    | Edit this page View Source

    ShouldBeInRange(int, Range, string)

    Asserts value is within range.

    Declaration
    public static int ShouldBeInRange(this int value, Range range, string paramName = "")
    Parameters
    Type Name Description
    int value

    Value to validate.

    Range range

    Valid range (end-exclusive).

    string paramName

    Captured automatically.

    Returns
    Type Description
    int

    value iff value is within range.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown iffvalue is not within range.

    | Edit this page View Source

    ShouldNotBeNegative(int, string)

    Asserts value is not negative.

    Declaration
    public static int ShouldNotBeNegative(this int value, string paramName = "")
    Parameters
    Type Name Description
    int value

    Value to validate.

    string paramName

    Captured automatically.

    Returns
    Type Description
    int

    value iff value is zero or positive.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown iffvalue is negative.