コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }