public NetSerializer(NetSerializerHasher hasher) { _hasher = hasher; _cache = new Dictionary <ulong, StructInfo>(); _registeredCustomTypes = new Dictionary <Type, CustomType>(); _writer = new NetDataWriter(); }
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); }
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) }; }