Serializes the object. Copies the primitive types of members.
More...
|
| ObjectSerializer (byte[] buffer) |
| Constructor.
|
|
| ObjectSerializer (int size) |
| Constructor.
|
|
void | Reset () |
| Resters the seek of buffer.
|
|
| ObjectSerializer (string[] array) |
| Constructor.
|
|
void | SetSeek (int seek) |
| Sets the seek of serialization.
|
|
void | Write (int num) |
| Writes number to buffer.
|
|
int | ReadInt () |
| Reads int from buffer.
|
|
void | Write (long num) |
| Writes lont to buffer.
|
|
long | ReadLong () |
| Reads long from buffer.
|
|
void | Write (DateTime dt) |
| Writes datetime to buffer.
|
|
DateTime | ReadDateTime () |
| Reads datetime from buffer.
|
|
void | Write (string str) |
| Writes string to buffer.
|
|
string | ReadString () |
| Reads string from buffer.
|
|
void | Write (decimal d) |
| Writes decimal value to buffer.
|
|
decimal | ReadDecimal () |
| Reads decimal value from buffer.
|
|
void | WriteString (string[] str) |
| Writes string array to buffer.
|
|
string[] | ReadStringArr () |
| Reads string array from buffer.
|
|
void | WriteObject (object[] obj) |
| Writes object array to buffer.
|
|
void | WriteObject (object obj) |
| Writes object to buffer.
|
|
object[] | ReadObjectArray () |
| Reads object array from buffer.
|
|
object | ReadObject () |
| Reads object from buffer.
|
|
void | WriteType (Type t) |
| Writes thy to buffer.
|
|
Type | ReadType () |
| Reads type from buffer.
|
|
void | Write (bool b) |
| Writes bool to buffer.
|
|
bool | ReadBool () |
| Reads bool from buffer.
|
|
void | Write (byte b) |
| Writes byte to buffer.
|
|
byte | ReadByte () |
| Reads byte from buffer.
|
|
byte[] | GetBuffer () |
| Returns the buffer of serializetion.
|
|
|
static int | ToByte (byte[] array, DateTime dt, int startIndex) |
| Writes datetime to byte array.
|
|
static DateTime | ToDateTime (byte[] array, int startIndex) |
| Converts a section of array to datetime.
|
|
static int | ToByte (byte[] array, int num, int startIndex) |
| Writes int to byte array.
|
|
static int | ToInt (byte[] array, int startIndex) |
| Converts a section of array to int.
|
|
static int | ToByte (byte[] array, double num, int startIndex) |
| Writes double to byte array.
|
|
static double | ToDouble (byte[] array, int startIndex) |
| Converts a section of array to double.
|
|
static int | ToByte (byte[] array, long num, int startIndex) |
| Writes long to byte array.
|
|
static long | ToLong (byte[] array, int startIndex) |
| Converts a section of array to long.
|
|
static int | ToByte (byte[] array, string str, int startIndex) |
| Writes string to byte array.
|
|
static int | ToString (byte[] array, out string str, int startIndex) |
| Reads a section of array to string.
|
|
|
int | Seek [get] |
| The seek value.
|
|
|
byte[] | buffer |
| Buffer of serializetion.
|
|
int | seek = 0 |
| Seek value.
|
|
|
static int | tInt = 1 |
| Int type.
|
|
static int | tLong = 2 |
| Long type.
|
|
static int | tDecimal = 3 |
| Decimal type.
|
|
static int | tDateTime = 4 |
| Datetime type.
|
|
static int | tString = 5 |
| String type.
|
|
static int | tSystemBoolean = 6 |
| Bool type.
|
|
static int | tDateTimeOffset = 7 |
| Offset of date time.
|
|
static int | tSystemDBNull = 8 |
| System.DBNull type.
|
|
static int | tSystemByte = 9 |
| Byte type.
|
|
Serializes the object. Copies the primitive types of members.
◆ ObjectSerializer() [1/3]
Tools.Serialize.ObjectSerializer.ObjectSerializer |
( |
byte[] | buffer | ) |
|
Constructor.
- Parameters
-
buffer | Buffer of serializetion/deserializetion. |
◆ ObjectSerializer() [2/3]
Tools.Serialize.ObjectSerializer.ObjectSerializer |
( |
int | size | ) |
|
◆ ObjectSerializer() [3/3]
Tools.Serialize.ObjectSerializer.ObjectSerializer |
( |
string[] | array | ) |
|
Constructor.
- Parameters
-
array | Array of string of values. |
◆ GetBuffer()
byte[] Tools.Serialize.ObjectSerializer.GetBuffer |
( |
| ) |
|
Returns the buffer of serializetion.
- Returns
- The buffer.
◆ ReadBool()
bool Tools.Serialize.ObjectSerializer.ReadBool |
( |
| ) |
|
Reads bool from buffer.
- Returns
- Readed value.
◆ ReadByte()
byte Tools.Serialize.ObjectSerializer.ReadByte |
( |
| ) |
|
Reads byte from buffer.
- Returns
- The readed byte.
◆ ReadDateTime()
DateTime Tools.Serialize.ObjectSerializer.ReadDateTime |
( |
| ) |
|
Reads datetime from buffer.
- Returns
- Datetime value.
◆ ReadDecimal()
decimal Tools.Serialize.ObjectSerializer.ReadDecimal |
( |
| ) |
|
Reads decimal value from buffer.
- Returns
- Decimal value.
◆ ReadInt()
int Tools.Serialize.ObjectSerializer.ReadInt |
( |
| ) |
|
Reads int from buffer.
- Returns
- Int value.
◆ ReadLong()
long Tools.Serialize.ObjectSerializer.ReadLong |
( |
| ) |
|
Reads long from buffer.
- Returns
- Long value.
◆ ReadObject()
object Tools.Serialize.ObjectSerializer.ReadObject |
( |
| ) |
|
Reads object from buffer.
- Returns
- The readed object.
◆ ReadObjectArray()
object[] Tools.Serialize.ObjectSerializer.ReadObjectArray |
( |
| ) |
|
Reads object array from buffer.
- Returns
- Array of objects.
◆ ReadString()
string Tools.Serialize.ObjectSerializer.ReadString |
( |
| ) |
|
Reads string from buffer.
- Returns
- String value.
◆ ReadStringArr()
string[] Tools.Serialize.ObjectSerializer.ReadStringArr |
( |
| ) |
|
Reads string array from buffer.
- Returns
- Array of stirng.
◆ ReadType()
Type Tools.Serialize.ObjectSerializer.ReadType |
( |
| ) |
|
Reads type from buffer.
- Returns
- The readed type.
◆ SetSeek()
void Tools.Serialize.ObjectSerializer.SetSeek |
( |
int | seek | ) |
|
Sets the seek of serialization.
- Parameters
-
◆ ToByte() [1/5]
static int Tools.Serialize.ObjectSerializer.ToByte |
( |
byte[] | array, |
|
|
DateTime | dt, |
|
|
int | startIndex ) |
|
static |
Writes datetime to byte array.
- Parameters
-
array | Array of destination. |
dt | Date time to write. |
startIndex | Startindex of array. |
- Returns
- Length of write.
◆ ToByte() [2/5]
static int Tools.Serialize.ObjectSerializer.ToByte |
( |
byte[] | array, |
|
|
double | num, |
|
|
int | startIndex ) |
|
static |
Writes double to byte array.
- Parameters
-
array | Array of destination. |
num | Number to write. |
startIndex | Startindex of array. |
- Returns
- Length of write.
◆ ToByte() [3/5]
static int Tools.Serialize.ObjectSerializer.ToByte |
( |
byte[] | array, |
|
|
int | num, |
|
|
int | startIndex ) |
|
static |
Writes int to byte array.
- Parameters
-
array | Array of destination. |
num | Number to write. |
startIndex | Startindex of array. |
- Returns
- Length of write.
◆ ToByte() [4/5]
static int Tools.Serialize.ObjectSerializer.ToByte |
( |
byte[] | array, |
|
|
long | num, |
|
|
int | startIndex ) |
|
static |
Writes long to byte array.
- Parameters
-
array | Array of destination. |
num | Number to write. |
startIndex | Startindex of array. |
- Returns
- Length of write.
◆ ToByte() [5/5]
static int Tools.Serialize.ObjectSerializer.ToByte |
( |
byte[] | array, |
|
|
string | str, |
|
|
int | startIndex ) |
|
static |
Writes string to byte array.
- Parameters
-
array | Array of destination. |
str | String to write. |
startIndex | |
- Returns
- Length of write.
◆ ToDateTime()
static DateTime Tools.Serialize.ObjectSerializer.ToDateTime |
( |
byte[] | array, |
|
|
int | startIndex ) |
|
static |
Converts a section of array to datetime.
- Parameters
-
array | Array of data. |
startIndex | Startindex of datetime. |
- Returns
- The date time.
◆ ToDouble()
static double Tools.Serialize.ObjectSerializer.ToDouble |
( |
byte[] | array, |
|
|
int | startIndex ) |
|
static |
Converts a section of array to double.
- Parameters
-
array | Array of data. |
startIndex | Startindex of double. |
- Returns
- Double value.
◆ ToInt()
static int Tools.Serialize.ObjectSerializer.ToInt |
( |
byte[] | array, |
|
|
int | startIndex ) |
|
static |
Converts a section of array to int.
- Parameters
-
array | Array of data. |
startIndex | Startindex of int. |
- Returns
- The int value.
◆ ToLong()
static long Tools.Serialize.ObjectSerializer.ToLong |
( |
byte[] | array, |
|
|
int | startIndex ) |
|
static |
Converts a section of array to long.
- Parameters
-
array | Array of data. |
startIndex | Startindex of long. |
- Returns
- The long value.
◆ ToString()
static int Tools.Serialize.ObjectSerializer.ToString |
( |
byte[] | array, |
|
|
out string | str, |
|
|
int | startIndex ) |
|
static |
Reads a section of array to string.
- Parameters
-
array | Array of data. |
str | String to read. |
startIndex | Start index of read. |
- Returns
◆ Write() [1/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
bool | b | ) |
|
Writes bool to buffer.
- Parameters
-
◆ Write() [2/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
byte | b | ) |
|
Writes byte to buffer.
- Parameters
-
◆ Write() [3/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
DateTime | dt | ) |
|
Writes datetime to buffer.
- Parameters
-
◆ Write() [4/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
decimal | d | ) |
|
Writes decimal value to buffer.
- Parameters
-
◆ Write() [5/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
int | num | ) |
|
Writes number to buffer.
- Parameters
-
◆ Write() [6/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
long | num | ) |
|
Writes lont to buffer.
- Parameters
-
◆ Write() [7/7]
void Tools.Serialize.ObjectSerializer.Write |
( |
string | str | ) |
|
Writes string to buffer.
- Parameters
-
◆ WriteObject() [1/2]
void Tools.Serialize.ObjectSerializer.WriteObject |
( |
object | obj | ) |
|
Writes object to buffer.
- Parameters
-
◆ WriteObject() [2/2]
void Tools.Serialize.ObjectSerializer.WriteObject |
( |
object[] | obj | ) |
|
Writes object array to buffer.
- Parameters
-
obj | Object array to write. |
◆ WriteString()
void Tools.Serialize.ObjectSerializer.WriteString |
( |
string[] | str | ) |
|
Writes string array to buffer.
- Parameters
-
◆ WriteType()
void Tools.Serialize.ObjectSerializer.WriteType |
( |
Type | t | ) |
|
Writes thy to buffer.
- Parameters
-
The documentation for this class was generated from the following file:
- Z:/x4t/src/Tools/Serialize/ObjectSerializer.cs