NonDisposableStream Class¶
Stream that delegates to an inner stream. This Stream is present so that the inner stream is not closed even when Close() or Dispose() is called.
- Namespace
Microsoft.AspNetCore.Mvc.Internal- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Inheritance Hierarchy¶
System.ObjectSystem.MarshalByRefObjectSystem.IO.StreamMicrosoft.AspNetCore.Mvc.Internal.NonDisposableStream
Syntax¶
public class NonDisposableStream : Stream, IDisposable
-
class
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream
Constructors¶
-
NonDisposableStream(System.IO.Stream)¶ Initializes a new
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.Arguments: innerStream (System.IO.Stream) – The stream which should not be closed or flushed. public NonDisposableStream(Stream innerStream)
-
Methods¶
-
BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)¶ Return type: System.IAsyncResult public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-
BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)¶ Return type: System.IAsyncResult public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-
Close()¶ public override void Close()
-
CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)¶ Return type: System.Threading.Tasks.Task public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
-
Dispose(System.Boolean)¶ protected override void Dispose(bool disposing)
-
EndRead(System.IAsyncResult)¶ Return type: System.Int32 public override int EndRead(IAsyncResult asyncResult)
-
EndWrite(System.IAsyncResult)¶ public override void EndWrite(IAsyncResult asyncResult)
-
Flush()¶ public override void Flush()
-
FlushAsync(System.Threading.CancellationToken)¶ Return type: System.Threading.Tasks.Task public override Task FlushAsync(CancellationToken cancellationToken)
-
Read(System.Byte[], System.Int32, System.Int32)¶ Return type: System.Int32 public override int Read(byte[] buffer, int offset, int count)
-
ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)¶ Return type: System.Threading.Tasks.Task<System.Int32> public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-
ReadByte()¶ Return type: System.Int32 public override int ReadByte()
-
Seek(System.Int64, System.IO.SeekOrigin)¶ Return type: System.Int64 public override long Seek(long offset, SeekOrigin origin)
-
SetLength(System.Int64)¶ public override void SetLength(long value)
-
Write(System.Byte[], System.Int32, System.Int32)¶ public override void Write(byte[] buffer, int offset, int count)
-
WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)¶ Return type: System.Threading.Tasks.Task public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-
WriteByte(System.Byte)¶ public override void WriteByte(byte value)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.CanRead¶ Return type: System.Boolean public override bool CanRead { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.CanSeek¶ Return type: System.Boolean public override bool CanSeek { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.CanTimeout¶ Return type: System.Boolean public override bool CanTimeout { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.CanWrite¶ Return type: System.Boolean public override bool CanWrite { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.InnerStream¶ The inner stream this object delegates to.
Return type: System.IO.Stream protected Stream InnerStream { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.Length¶ Return type: System.Int64 public override long Length { get; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.Position¶ Return type: System.Int64 public override long Position { get; set; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.ReadTimeout¶ Return type: System.Int32 public override int ReadTimeout { get; set; }
-
Microsoft.AspNetCore.Mvc.Internal.NonDisposableStream.WriteTimeout¶ Return type: System.Int32 public override int WriteTimeout { get; set; }
-