Class Reference<T>
Inherited Members
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 SourceReference()
Create an empty reference.
Declaration
public Reference()
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?
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 SourceValue
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 Sourceimplicit 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 :) .