public BasicTypeSerializerContext(int defaultBufferSize = 1024, int highWatermark = 0, OnHighWatermarkEvent highWatermarkEvent = null, bool byteLevelWatermark = false) { if (defaultBufferSize < MinimumBufferSize) throw new ArgumentOutOfRangeException("defaultBufferSize"); _serializeBuffer = new byte[defaultBufferSize]; _storeFunction = StoreToBuffer; HighWatermarkEvent = highWatermarkEvent; HighWatermark = highWatermark; ByteLevelWaterMark = byteLevelWatermark; InitializeHeader(); }
public BasicTypeSerializerContext(int defaultBufferSize = 1024, int highWatermark = 0, OnHighWatermarkEvent highWatermarkEvent = null, bool byteLevelWatermark = false) { if (defaultBufferSize < MinimumBufferSize) { throw new ArgumentOutOfRangeException("defaultBufferSize"); } _serializeBuffer = new byte[defaultBufferSize]; _storeFunction = StoreToBuffer; HighWatermarkEvent = highWatermarkEvent; HighWatermark = highWatermark; ByteLevelWaterMark = byteLevelWatermark; InitializeHeader(); }