ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.Data.GNData< TKey > Class Template Referenceabstract

Abstract class representing generic data operations. More...

Inheritance diagram for XmobiTea.Data.GNData< TKey >:
XmobiTea.Data.IGNData

Public Member Functions

object GetObject (TKey k)
 Abstract method to get an object based on the provided key.
 
sbyte GetSByte (TKey k, sbyte defaultValue=0)
 Gets a signed byte value associated with the provided key.
 
byte GetByte (TKey k, byte defaultValue=0)
 Gets a byte value associated with the provided key.
 
short GetShort (TKey k, short defaultValue=0)
 Gets a short value associated with the provided key.
 
ushort GetUShort (TKey k, ushort defaultValue=0)
 Gets an unsigned short value associated with the provided key.
 
int GetInt (TKey k, int defaultValue=0)
 Gets an int value associated with the provided key.
 
uint GetUInt (TKey k, uint defaultValue=0)
 Gets an unsigned int value associated with the provided key.
 
float GetFloat (TKey k, float defaultValue=0)
 Gets a float value associated with the provided key.
 
long GetLong (TKey k, long defaultValue=0)
 Gets a long value associated with the provided key.
 
ulong GetULong (TKey k, ulong defaultValue=0)
 Gets an unsigned long value associated with the provided key.
 
double GetDouble (TKey k, double defaultValue=0)
 Gets a double value associated with the provided key.
 
bool GetBool (TKey k, bool defaultValue=false)
 Gets a boolean value associated with the provided key.
 
string GetString (TKey k, string defaultValue=null)
 Gets a string value associated with the provided key.
 
object GetObject (TKey k, object defaultValue=null)
 Gets an object associated with the provided key.
 
T[] GetArray< T > (TKey k, T[] defaultValue=null)
 Gets an array of a specified type associated with the provided key.
 
System.Collections.Generic.IList< T > GetList< T > (TKey k, System.Collections.Generic.IList< T > defaultValue=null)
 Gets a list of a specified type associated with the provided key.
 
System.Collections.Generic.IDictionary< string, TObject > GetDictionary< TObject > (TKey k, System.Collections.Generic.IDictionary< string, TObject > defaultValue=null)
 Gets a dictionary of a specified type associated with the provided key.
 
GNArray GetGNArray (TKey k, GNArray defaultValue=null)
 Gets a GNArray object associated with the provided key.
 
GNHashtable GetGNHashtable (TKey k, GNHashtable defaultValue=null)
 Gets a GNHashtable object associated with the provided key.
 
object ToData ()
 Abstract method to convert the data to an object.
 
- Public Member Functions inherited from XmobiTea.Data.IGNData

Protected Member Functions

object CreateUseDataFromOriginData (object value)
 Creates data that can be used from the original data.
 
object CreateDataFromUseData (object value)
 Converts the use data back into its original form.
 
object CustomGet (TKey k)
 Custom method to retrieve an object based on the key and its type.
 

Detailed Description

Abstract class representing generic data operations.

Template Parameters
TKeyThe type of the key used to access data.

Member Function Documentation

◆ CreateDataFromUseData()

object XmobiTea.Data.GNData< TKey >.CreateDataFromUseData ( object value)
protected

Converts the use data back into its original form.

Parameters
valueThe data used in the application.
Returns
The original data object.

◆ CreateUseDataFromOriginData()

object XmobiTea.Data.GNData< TKey >.CreateUseDataFromOriginData ( object value)
protected

Creates data that can be used from the original data.

Parameters
valueThe original data value.
Returns
A data object suitable for use, or the original value if no conversion is needed.

◆ CustomGet()

object XmobiTea.Data.GNData< TKey >.CustomGet ( TKey k)
protected

Custom method to retrieve an object based on the key and its type.

Parameters
kThe key to retrieve the object.
Returns
The object, converted to the appropriate type if necessary.

◆ GetArray< T >()

T[] XmobiTea.Data.GNData< TKey >.GetArray< T > ( TKey k,
T[] defaultValue = null )

Gets an array of a specified type associated with the provided key.

Template Parameters
TThe type of elements in the array.
Parameters
kThe key to retrieve the array.
defaultValueThe default array if the key does not exist.
Returns
An array of the specified type.

◆ GetBool()

bool XmobiTea.Data.GNData< TKey >.GetBool ( TKey k,
bool defaultValue = false )

Gets a boolean value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The boolean value.

◆ GetByte()

byte XmobiTea.Data.GNData< TKey >.GetByte ( TKey k,
byte defaultValue = 0 )

Gets a byte value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The byte value.

◆ GetDictionary< TObject >()

System.Collections.Generic.IDictionary< string, TObject > XmobiTea.Data.GNData< TKey >.GetDictionary< TObject > ( TKey k,
System.Collections.Generic.IDictionary< string, TObject > defaultValue = null )

Gets a dictionary of a specified type associated with the provided key.

Template Parameters
TObjectThe type of values in the dictionary.
Parameters
kThe key to retrieve the dictionary.
defaultValueThe default dictionary if the key does not exist.
Returns
A dictionary with string keys and values of the specified type.

◆ GetDouble()

double XmobiTea.Data.GNData< TKey >.GetDouble ( TKey k,
double defaultValue = 0 )

Gets a double value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The double value.

◆ GetFloat()

float XmobiTea.Data.GNData< TKey >.GetFloat ( TKey k,
float defaultValue = 0 )

Gets a float value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The float value.

◆ GetGNArray()

GNArray XmobiTea.Data.GNData< TKey >.GetGNArray ( TKey k,
GNArray defaultValue = null )

Gets a GNArray object associated with the provided key.

Parameters
kThe key to retrieve the GNArray.
defaultValueThe default GNArray if the key does not exist.
Returns
The GNArray object.

◆ GetGNHashtable()

GNHashtable XmobiTea.Data.GNData< TKey >.GetGNHashtable ( TKey k,
GNHashtable defaultValue = null )

Gets a GNHashtable object associated with the provided key.

Parameters
kThe key to retrieve the GNHashtable.
defaultValueThe default GNHashtable if the key does not exist.
Returns
The GNHashtable object.

◆ GetInt()

int XmobiTea.Data.GNData< TKey >.GetInt ( TKey k,
int defaultValue = 0 )

Gets an int value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The int value.

◆ GetList< T >()

System.Collections.Generic.IList< T > XmobiTea.Data.GNData< TKey >.GetList< T > ( TKey k,
System.Collections.Generic.IList< T > defaultValue = null )

Gets a list of a specified type associated with the provided key.

Template Parameters
TThe type of elements in the list.
Parameters
kThe key to retrieve the list.
defaultValueThe default list if the key does not exist.
Returns
A list of the specified type.

◆ GetLong()

long XmobiTea.Data.GNData< TKey >.GetLong ( TKey k,
long defaultValue = 0 )

Gets a long value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The long value.

◆ GetObject() [1/2]

object XmobiTea.Data.GNData< TKey >.GetObject ( TKey k)
abstract

Abstract method to get an object based on the provided key.

Parameters
kThe key to retrieve the object.
Returns
The object associated with the key.

◆ GetObject() [2/2]

object XmobiTea.Data.GNData< TKey >.GetObject ( TKey k,
object defaultValue = null )

Gets an object associated with the provided key.

Parameters
kThe key to retrieve the object.
defaultValueThe default object if the key does not exist.
Returns
The object value.

◆ GetSByte()

sbyte XmobiTea.Data.GNData< TKey >.GetSByte ( TKey k,
sbyte defaultValue = 0 )

Gets a signed byte value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The signed byte value.

◆ GetShort()

short XmobiTea.Data.GNData< TKey >.GetShort ( TKey k,
short defaultValue = 0 )

Gets a short value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The short value.

◆ GetString()

string XmobiTea.Data.GNData< TKey >.GetString ( TKey k,
string defaultValue = null )

Gets a string value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The string value.

◆ GetUInt()

uint XmobiTea.Data.GNData< TKey >.GetUInt ( TKey k,
uint defaultValue = 0 )

Gets an unsigned int value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The unsigned int value.

◆ GetULong()

ulong XmobiTea.Data.GNData< TKey >.GetULong ( TKey k,
ulong defaultValue = 0 )

Gets an unsigned long value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The unsigned long value.

◆ GetUShort()

ushort XmobiTea.Data.GNData< TKey >.GetUShort ( TKey k,
ushort defaultValue = 0 )

Gets an unsigned short value associated with the provided key.

Parameters
kThe key to retrieve the value.
defaultValueThe default value if the key does not exist.
Returns
The unsigned short value.

◆ ToData()

object XmobiTea.Data.GNData< TKey >.ToData ( )
abstract

Abstract method to convert the data to an object.

Returns
The converted object.

Implements XmobiTea.Data.IGNData.


The documentation for this class was generated from the following file: