Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Static Public Member Functions | List of all members
ExtraSynchronizers< SyncManager > Class Template Reference

Default synchronizers, beyond those provided by the SyncManager itself and by TupleSynchronizer{SM}, that DefaultSynchronizer{SM,T} discovers via reflection (once per closed generic pair): arrays, common collections, dictionaries, KeyValuePair, enums, DateTime and TimeSpan. Collection items are synchronized recursively via DefaultSyncField{SM,T}, so e.g. List<(int, Person[])> works as long as Person is registered in the ambient TypeSyncRegistry. More...


Source file:

Remarks

Default synchronizers, beyond those provided by the SyncManager itself and by TupleSynchronizer{SM}, that DefaultSynchronizer{SM,T} discovers via reflection (once per closed generic pair): arrays, common collections, dictionaries, KeyValuePair, enums, DateTime and TimeSpan. Collection items are synchronized recursively via DefaultSyncField{SM,T}, so e.g. List<(int, Person[])> works as long as Person is registered in the ambient TypeSyncRegistry.

Type Constraints
SyncManager :ISyncManager 

Static Public Member Functions

static byte[] Sync (ref SyncManager sync, FieldId name, byte[]?value)
 
static bool[] Sync (ref SyncManager sync, FieldId name, bool[]?value)
 
static char[] Sync (ref SyncManager sync, FieldId name, char[]?value)
 
static DateTime Sync (ref SyncManager sync, FieldId name, DateTime value)
 
static DateTime Sync (ref SyncManager sync, FieldId name, DateTime?value)
 
static TimeSpan Sync (ref SyncManager sync, FieldId name, TimeSpan value)
 
static TimeSpan Sync (ref SyncManager sync, FieldId name, TimeSpan?value)
 
static E SyncEnum< E > (ref SyncManager sync, FieldId name, E value)
 Synchronizes an enum numerically (as its underlying value), which suits binary formats and Protocol Buffers; SyncEnumAsString{SM,E} remains available as an opt-in alternative. More...
 
static E[] SyncArray< E > (ref SyncManager sync, FieldId name, E[]?value)
 
static List< E > Sync< E > (ref SyncManager sync, FieldId name, List< E >?value)
 
static IList< E > Sync< E > (ref SyncManager sync, FieldId name, IList< E >?value)
 
static IReadOnlyList< E > Sync< E > (ref SyncManager sync, FieldId name, IReadOnlyList< E >?value)
 
static HashSet< E > Sync< E > (ref SyncManager sync, FieldId name, HashSet< E >?value)
 
static Dictionary< K, V > Sync< K, V > (ref SyncManager sync, FieldId name, Dictionary< K, V >?value)
 
static IDictionary< K, V > Sync< K, V > (ref SyncManager sync, FieldId name, IDictionary< K, V >?value)
 
static KeyValuePair< K, V > Sync< K, V > (ref SyncManager sync, FieldId name, KeyValuePair< K, V > value)
 

Member Function Documentation

static E ExtraSynchronizers< SyncManager >.SyncEnum< E > ( ref SyncManager  sync,
FieldId  name,
value 
)
inlinestatic

Synchronizes an enum numerically (as its underlying value), which suits binary formats and Protocol Buffers; SyncEnumAsString{SM,E} remains available as an opt-in alternative.

Type Constraints
E :struct 
E :Enum