示例#1
0
 // TODO: ChannelBindingSupport
 public AspNetCoreHttpInput(AspNetCoreHttpContext aspNetCoreHttpContext)
     : base(aspNetCoreHttpContext.HttpTransportSettings, true, false /* ChannelBindingSupportEnabled */)
 {
     _aspNetCoreHttpContext = aspNetCoreHttpContext;
     if (!_aspNetCoreHttpContext._aspNetContext.Request.ContentLength.HasValue)
     {
         // TODO: Look into useing PipeReader with look-ahead
         _preReadBuffer = new byte[1];
         if (_aspNetCoreHttpContext._aspNetContext.Request.Body.Read(_preReadBuffer, 0, 1) == 0)
         {
             _preReadBuffer = null;
         }
     }
 }
示例#2
0
 public AspNetCoreInputStream(AspNetCoreHttpContext aspNetCoreHttpContext, byte[] preReadBuffer)
     : base(new PreReadStream(aspNetCoreHttpContext._aspNetContext.Request.Body, preReadBuffer))
 {
 }
示例#3
0
 public AspNetCoreInputStream(AspNetCoreHttpContext aspNetCoreHttpContext)
     : base(aspNetCoreHttpContext._aspNetContext.Request.Body)
 {
 }