Search Results for

    Show / Hide Table of Contents

    Class Reference<T>

    A reference to another Data that might be in Database.

    Inheritance
    object
    Reference
    Reference<T>
    Inherited Members
    Reference.ContraintID
    Namespace: GGL.DB.Reference
    Assembly: GGL.dll
    Syntax
    [Serializable]
    [JsonConverter(typeof(ReferenceConverter))]
    public class Reference<T> : Reference where T : Data
    Type Parameters
    Name Description
    T

    Data type

    Constructors

    | Edit this page View Source

    Reference()

    Create an empty reference.

    Declaration
    public Reference()
    | Edit this page View Source

    Reference(ulong)

    Create a reference to the data by its ID.

    Declaration
    public Reference(ulong id)
    Parameters
    Type Name Description
    ulong id

    Id of the data in database.

    Remarks

    That means that your data was previously added in database. You did, right?

    | Edit this page View Source

    Reference(T)

    Create a reference to a data

    Declaration
    public Reference(T value)
    Parameters
    Type Name Description
    T value
    Remarks

    The data doesn't not need to be in database yet. This won't insert the data in database.

    Properties

    | Edit this page View Source

    Value

    Declaration
    [JsonIgnore]
    public T Value { get; }
    Property Value
    Type Description
    T

    Access the cached data value.

    Remarks

    If not cached yet, will cache it for you :) .

    Operators

    | Edit this page View Source

    implicit operator T(Reference<T>)

    Returns directly the cached value of the reference.

    Declaration
    public static implicit operator T(Reference<T> current)
    Parameters
    Type Name Description
    Reference<T> current

    this.

    Returns
    Type Description
    T

    Cached value of the reference.

    Remarks

    If not cached yet, will cache it for you :) .

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