Search Results for

    Show / Hide Table of Contents

    Class FallbackExtensions

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

    Methods

    | Edit this page View Source

    IsOr<TParent, TChild>(TParent, TChild)

    Declaration
    public static TChild IsOr<TParent, TChild>(this TParent obj, TChild fallbackChild) where TChild : TParent
    Parameters
    Type Name Description
    TParent obj
    TChild fallbackChild
    Returns
    Type Description
    TChild
    Type Parameters
    Name Description
    TParent
    TChild
    | Edit this page View Source

    Or(string, string)

    Returns the fallback string if the original string is null, empty, or consists only of white-space characters. Super often used to provide default values for optional string parameters.

    Declaration
    public static string Or(this string value, string fallback)
    Parameters
    Type Name Description
    string value
    string fallback
    Returns
    Type Description
    string
    | Edit this page View Source

    OrDefault<TEnum>(TEnum?)

    Declaration
    public static TEnum OrDefault<TEnum>(this TEnum? value) where TEnum : struct, Enum
    Parameters
    Type Name Description
    TEnum? value
    Returns
    Type Description
    TEnum
    Type Parameters
    Name Description
    TEnum
    | Edit this page View Source

    OrEmpty<TCol>(TCol)

    Declaration
    public static TCol OrEmpty<TCol>(this TCol c) where TCol : class, ICollection, new()
    Parameters
    Type Name Description
    TCol c
    Returns
    Type Description
    TCol
    Type Parameters
    Name Description
    TCol
    | Edit this page View Source

    OrFalse(bool?)

    Declaration
    public static bool OrFalse(this bool? value)
    Parameters
    Type Name Description
    bool? value
    Returns
    Type Description
    bool
    | Edit this page View Source

    OrZero(int?)

    Declaration
    public static int OrZero(this int? value)
    Parameters
    Type Name Description
    int? value
    Returns
    Type Description
    int
    | Edit this page View Source

    OrZero(float?)

    Declaration
    public static float OrZero(this float? value)
    Parameters
    Type Name Description
    float? value
    Returns
    Type Description
    float
    | Edit this page View Source

    ToStringOrDash(int)

    Declaration
    public static string ToStringOrDash(this int value)
    Parameters
    Type Name Description
    int value
    Returns
    Type Description
    string
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation