/// <summary>
 /// Create a new <see cref="ProtoInputFormatter"/> instance
 /// </summary>
 public ProtoInputFormatter(MvcProtoBufNetOptions options, MvcOptions mvcOptions)
 {
     _model = options.Model ?? RuntimeTypeModel.Default;
     _memoryBufferThreshold = options.ReadMemoryBufferThreshold;
     _suppressBuffering     = mvcOptions.SuppressInputFormatterBuffering;
 }
示例#2
0
 /// <summary>
 /// Create a new <see cref="ProtoOutputFormatter"/> instance
 /// </summary>
 public ProtoOutputFormatter(MvcProtoBufNetOptions options, MvcOptions mvcOptions)
 {
     _model             = options.Model ?? RuntimeTypeModel.Default;
     _maxLength         = options.WriteMaxLength;
     _suppressBuffering = mvcOptions.SuppressOutputFormatterBuffering;
 }