Show / Hide Table of Contents

    Class ThingExtensions

    Static class with helper methods for things.

    Inheritance
    System.Object
    ThingExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Mechanics.Contracts.Extensions
    Assembly: Fibula.Mechanics.Contracts.dll
    Syntax
    public static class ThingExtensions

    Methods

    | Improve this Doc View Source

    HasCondition(IThing, ConditionType)

    Checks if the thing has the given condition.

    Declaration
    public static bool HasCondition(this IThing thing, ConditionType conditionType)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the conditions on.

    ConditionType conditionType

    The type of condition.

    Returns
    Type Description
    System.Boolean

    True if the thing has such condition, false otherwise.

    | Improve this Doc View Source

    IsExhausted(IThing, ExhaustionType)

    Checks if the thing is exhausted.

    Declaration
    public static bool IsExhausted(this IThing thing, ExhaustionType type)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the exhaustion condition on.

    ExhaustionType type

    The type of exhaustion to check for.

    Returns
    Type Description
    System.Boolean

    True if the thing has such condition, false otherwise.

    | Improve this Doc View Source

    RemainingExhaustionTime(IThing, ExhaustionType, DateTimeOffset)

    Calculates the remaining System.TimeSpan until the thing's exhaustion is over.

    Declaration
    public static TimeSpan RemainingExhaustionTime(this IThing thing, ExhaustionType exhaustionType, DateTimeOffset currentTime)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the conditions on.

    ExhaustionType exhaustionType

    The type of condition.

    System.DateTimeOffset currentTime

    The current time to calculate from.

    Returns
    Type Description
    System.TimeSpan

    The System.TimeSpan result.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.