Esempio n. 1
0
 public NetSerializer(NetSerializerHasher hasher)
 {
     _hasher = hasher;
     _cache  = new Dictionary <ulong, StructInfo>();
     _registeredCustomTypes = new Dictionary <Type, CustomType>();
     _writer = new NetDataWriter();
 }
Esempio n. 2
0
 public NetSerializer(NetSerializerHasher hasher, int maxStringLength = 1024)
 {
     _maxStringLength       = maxStringLength;
     _hasher                = hasher;
     _cache                 = new Dictionary <ulong, StructInfo>();
     _registeredCustomTypes = new Dictionary <Type, CustomType>();
     _writer                = new NetDataWriter(true, 512);
 }
Esempio n. 3
0
 public NetSerializer(NetSerializerHasher hasher)
 {
     _hasher = hasher;
     _cache  = new Dictionary <ulong, StructInfo>();
     _registeredCustomTypes = new Dictionary <Type, CustomType>();
     _writer     = new NetDataWriter();
     _basicTypes = new HashSet <Type>
     {
         typeof(int),
         typeof(uint),
         typeof(byte),
         typeof(sbyte),
         typeof(short),
         typeof(ushort),
         typeof(long),
         typeof(ulong),
         typeof(string),
         typeof(float),
         typeof(double),
         typeof(bool)
     };
 }