Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Properties | Public Member Functions | List of all members
SyncBinary.Reader Struct Reference

An implementation of ISyncManager for reading SyncLib's compact, high-performance data format. Note that while SupportsDeduplication is true, SupportsReordering and SupportsNextField are false, the binary format is not self-describing, and field names/IDs are not stored in the data stream, so you must be careful to read the data in the same order and with compatible types as what was written (for details and guidelines, see SyncBinary). Please call SyncBinary.Read or SyncBinary.ReadI if you just want to serialize something, or NewWriter to create one of these. More...


Source file:
Inheritance diagram for SyncBinary.Reader:

Remarks

An implementation of ISyncManager for reading SyncLib's compact, high-performance data format. Note that while SupportsDeduplication is true, SupportsReordering and SupportsNextField are false, the binary format is not self-describing, and field names/IDs are not stored in the data stream, so you must be careful to read the data in the same order and with compatible types as what was written (for details and guidelines, see SyncBinary). Please call SyncBinary.Read or SyncBinary.ReadI if you just want to serialize something, or NewWriter to create one of these.

Reader can read files of unlimited size.

This is a struct rather than a class for performance reasons. Don't try to use a default(Reader); it'll just throw NullReferenceException.

Public fields

SyncMode Mode => SyncMode.Reading
 
bool IsReading => true
 
bool IsWriting => false
 
bool SupportsReordering => false
 
bool SupportsDeduplication => true
 
bool NeedsIntegerIds => false
 
bool IsPlainText => false
 
ISyncOptions Options => _s._opt
 
bool IsInsideList => _s.IsInsideList
 
bool ReachedEndOfList => null
 
int MinimumListLength => 0
 
int Depth => _s.Depth
 
bool SupportsNextField => false
 
FieldId NextField => FieldId.Missing
 
bool Begun
 
bool int Length
 

Properties

object CurrentObject [set]
 

Public Member Functions

SyncType GetFieldType (FieldId name, SyncType expectedType=SyncType.Unknown)
 
bool Sync (FieldId name, bool savable)
 
sbyte Sync (FieldId name, sbyte savable)
 
byte Sync (FieldId name, byte savable)
 
short Sync (FieldId name, short savable)
 
ushort Sync (FieldId name, ushort savable)
 
int Sync (FieldId name, int savable)
 
uint Sync (FieldId name, uint savable)
 
long Sync (FieldId name, long savable)
 
ulong Sync (FieldId name, ulong savable)
 
float Sync (FieldId name, float savable)
 
double Sync (FieldId name, double savable)
 
decimal Sync (FieldId name, decimal savable)
 
BigInteger Sync (FieldId name, BigInteger savable)
 
char Sync (FieldId name, char savable)
 
string Sync (FieldId name, string?savable, ObjectMode mode=ObjectMode.Normal)
 
bool Sync (FieldId name, bool?savable)
 
sbyte Sync (FieldId name, sbyte?savable)
 
byte Sync (FieldId name, byte?savable)
 
short Sync (FieldId name, short?savable)
 
ushort Sync (FieldId name, ushort?savable)
 
int Sync (FieldId name, int?savable)
 
uint Sync (FieldId name, uint?savable)
 
long Sync (FieldId name, long?savable)
 
ulong Sync (FieldId name, ulong?savable)
 
float Sync (FieldId name, float?savable)
 
double Sync (FieldId name, double?savable)
 
decimal Sync (FieldId name, decimal?savable)
 
BigInteger Sync (FieldId name, BigInteger?savable)
 
char Sync (FieldId name, char?savable)
 
int Sync (FieldId name, int savable, int bits, bool signed=true)
 
long Sync (FieldId name, long savable, int bits, bool signed=true)
 
BigInteger Sync (FieldId name, BigInteger savable, int bits, bool signed=true)
 
List SyncListBoolImpl< Scanner, List, ListBuilder > (FieldId name, Scanner scanner, List?saving, ListBuilder builder, ObjectMode mode, int tupleLength=-1)
 
List SyncListByteImpl< Scanner, List, ListBuilder > (FieldId name, Scanner scanner, List?saving, ListBuilder builder, ObjectMode mode, int tupleLength=-1)
 
List SyncListCharImpl< Scanner, List, ListBuilder > (FieldId name, Scanner scanner, List?saving, ListBuilder builder, ObjectMode mode, int tupleLength=-1)
 
bool int object Object BeginSubObject (FieldId name, object?childKey, ObjectMode mode, int listLength=-1)
 
void EndSubObject ()
 
string SyncTypeTag (string?tag)