Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/IO/Stream.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

958 lines
44 KiB
C#

using System;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Cpp2IlInjected;
namespace System.IO
{
/// <summary>Provides a generic view of a sequence of bytes. This is an abstract class.</summary>
// Token: 0x0200029C RID: 668
[Token(Token = "0x200029C")]
[ComVisible(true)]
[Serializable]
public abstract class Stream : MarshalByRefObject, IDisposable
{
// Token: 0x06001834 RID: 6196 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001834")]
[Address(RVA = "0xCCD860", Offset = "0xCCC860", VA = "0x180CCD860")]
internal SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized()
{
return null;
}
/// <summary>When overridden in a derived class, gets a value indicating whether the current stream supports reading.</summary>
/// <returns>
/// <see langword="true" /> if the stream supports reading; otherwise, <see langword="false" />.</returns>
// Token: 0x170002E2 RID: 738
// (get) Token: 0x06001835 RID: 6197
[Token(Token = "0x170002E2")]
public abstract bool CanRead
{
[Token(Token = "0x6001835")]
[Address(Slot = "7")]
get;
}
/// <summary>When overridden in a derived class, gets a value indicating whether the current stream supports seeking.</summary>
/// <returns>
/// <see langword="true" /> if the stream supports seeking; otherwise, <see langword="false" />.</returns>
// Token: 0x170002E3 RID: 739
// (get) Token: 0x06001836 RID: 6198
[Token(Token = "0x170002E3")]
public abstract bool CanSeek
{
[Token(Token = "0x6001836")]
[Address(Slot = "8")]
get;
}
/// <summary>When overridden in a derived class, gets a value indicating whether the current stream supports writing.</summary>
/// <returns>
/// <see langword="true" /> if the stream supports writing; otherwise, <see langword="false" />.</returns>
// Token: 0x170002E4 RID: 740
// (get) Token: 0x06001837 RID: 6199
[Token(Token = "0x170002E4")]
public abstract bool CanWrite
{
[Token(Token = "0x6001837")]
[Address(Slot = "9")]
get;
}
/// <summary>When overridden in a derived class, gets the length in bytes of the stream.</summary>
/// <returns>A long value representing the length of the stream in bytes.</returns>
/// <exception cref="T:System.NotSupportedException">A class derived from <see langword="Stream" /> does not support seeking.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x170002E5 RID: 741
// (get) Token: 0x06001838 RID: 6200
[Token(Token = "0x170002E5")]
public abstract long Length
{
[Token(Token = "0x6001838")]
[Address(Slot = "10")]
get;
}
/// <summary>When overridden in a derived class, gets or sets the position within the current stream.</summary>
/// <returns>The current position within the stream.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x170002E6 RID: 742
// (get) Token: 0x06001839 RID: 6201
// (set) Token: 0x0600183A RID: 6202
[Token(Token = "0x170002E6")]
public abstract long Position
{
[Token(Token = "0x6001839")]
[Address(Slot = "11")]
get;
[Token(Token = "0x600183A")]
[Address(Slot = "12")]
set;
}
/// <summary>Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.</summary>
/// <returns>A value, in miliseconds, that determines how long the stream will attempt to read before timing out.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.IO.Stream.ReadTimeout" /> method always throws an <see cref="T:System.InvalidOperationException" />.</exception>
// Token: 0x170002E7 RID: 743
// (get) Token: 0x0600183B RID: 6203 RVA: 0x000107A0 File Offset: 0x0000E9A0
[Token(Token = "0x170002E7")]
[ComVisible(false)]
public virtual int ReadTimeout
{
[Token(Token = "0x600183B")]
[Address(RVA = "0xCCE580", Offset = "0xCCD580", VA = "0x180CCE580", Slot = "13")]
get
{
return 0;
}
}
/// <summary>Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.</summary>
/// <returns>A value, in miliseconds, that determines how long the stream will attempt to write before timing out.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.IO.Stream.WriteTimeout" /> method always throws an <see cref="T:System.InvalidOperationException" />.</exception>
// Token: 0x170002E8 RID: 744
// (get) Token: 0x0600183C RID: 6204 RVA: 0x000107B8 File Offset: 0x0000E9B8
[Token(Token = "0x170002E8")]
[ComVisible(false)]
public virtual int WriteTimeout
{
[Token(Token = "0x600183C")]
[Address(RVA = "0xCCE5F0", Offset = "0xCCD5F0", VA = "0x180CCE5F0", Slot = "14")]
get
{
return 0;
}
}
/// <summary>Reads the bytes from the current stream and writes them to another stream.</summary>
/// <param name="destination">The stream to which the contents of the current stream will be copied.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destination" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.NotSupportedException">The current stream does not support reading.
/// -or-
/// <paramref name="destination" /> does not support writing.</exception>
/// <exception cref="T:System.ObjectDisposedException">Either the current stream or <paramref name="destination" /> were closed before the <see cref="M:System.IO.Stream.CopyTo(System.IO.Stream)" /> method was called.</exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurred.</exception>
// Token: 0x0600183D RID: 6205 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600183D")]
[Address(RVA = "0xCCD150", Offset = "0xCCC150", VA = "0x180CCD150")]
public void CopyTo(Stream destination)
{
}
// Token: 0x0600183E RID: 6206 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600183E")]
[Address(RVA = "0xCCDB60", Offset = "0xCCCB60", VA = "0x180CCDB60")]
private void InternalCopyTo(Stream destination, int bufferSize)
{
}
/// <summary>Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.</summary>
// Token: 0x0600183F RID: 6207 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600183F")]
[Address(RVA = "0xCCD0E0", Offset = "0xCCC0E0", VA = "0x180CCD0E0", Slot = "15")]
public virtual void Close()
{
}
/// <summary>Releases all resources used by the <see cref="T:System.IO.Stream" />.</summary>
// Token: 0x06001840 RID: 6208 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001840")]
[Address(RVA = "0x9DE1B0", Offset = "0x9DD1B0", VA = "0x1809DE1B0", Slot = "6")]
public void Dispose()
{
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.Stream" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
// Token: 0x06001841 RID: 6209 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001841")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "16")]
protected virtual void Dispose(bool disposing)
{
}
/// <summary>When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.</summary>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
// Token: 0x06001842 RID: 6210
[Token(Token = "0x6001842")]
[Address(Slot = "17")]
public abstract void Flush();
/// <summary>Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.</summary>
/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
/// <returns>A task that represents the asynchronous flush operation.</returns>
/// <exception cref="T:System.ObjectDisposedException">The stream has been disposed.</exception>
// Token: 0x06001843 RID: 6211 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001843")]
[Address(RVA = "0xCCD950", Offset = "0xCCC950", VA = "0x180CCD950", Slot = "18")]
[ComVisible(false)]
public virtual Task FlushAsync(CancellationToken cancellationToken)
{
return null;
}
/// <summary>Begins an asynchronous read operation. (Consider using <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> instead.)</summary>
/// <param name="buffer">The buffer to read the data into.</param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> at which to begin writing data read from the stream.</param>
/// <param name="count">The maximum number of bytes to read.</param>
/// <param name="callback">An optional asynchronous callback, to be called when the read is complete.</param>
/// <param name="state">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param>
/// <returns>An <see cref="T:System.IAsyncResult" /> that represents the asynchronous read, which could still be pending.</returns>
/// <exception cref="T:System.IO.IOException">Attempted an asynchronous read past the end of the stream, or a disk error occurs.</exception>
/// <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
/// <exception cref="T:System.NotSupportedException">The current <see langword="Stream" /> implementation does not support the read operation.</exception>
// Token: 0x06001844 RID: 6212 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001844")]
[Address(RVA = "0xCCCB70", Offset = "0xCCBB70", VA = "0x180CCCB70", Slot = "19")]
public virtual IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x06001845 RID: 6213 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001845")]
[Address(RVA = "0xCCC950", Offset = "0xCCB950", VA = "0x180CCC950")]
internal IAsyncResult BeginReadInternal(byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously)
{
return null;
}
/// <summary>Waits for the pending asynchronous read to complete. (Consider using <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> instead.)</summary>
/// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
/// <returns>The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="asyncResult" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">A handle to the pending read operation is not available.
/// -or-
/// The pending operation does not support reading.</exception>
/// <exception cref="T:System.InvalidOperationException">
/// <paramref name="asyncResult" /> did not originate from a <see cref="M:System.IO.Stream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> method on the current stream.</exception>
/// <exception cref="T:System.IO.IOException">The stream is closed or an internal error has occurred.</exception>
// Token: 0x06001846 RID: 6214 RVA: 0x000107D0 File Offset: 0x0000E9D0
[Token(Token = "0x6001846")]
[Address(RVA = "0xCCD400", Offset = "0xCCC400", VA = "0x180CCD400", Slot = "20")]
public virtual int EndRead(IAsyncResult asyncResult)
{
return 0;
}
/// <summary>Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.</summary>
/// <param name="buffer">The buffer to write the data into.</param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> at which to begin writing data from the stream.</param>
/// <param name="count">The maximum number of bytes to read.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
/// <returns>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the stream has been reached.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is larger than the buffer length.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support reading.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream has been disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The stream is currently in use by a previous read operation.</exception>
// Token: 0x06001847 RID: 6215 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001847")]
[Address(RVA = "0xCCDC20", Offset = "0xCCCC20", VA = "0x180CCDC20", Slot = "21")]
[ComVisible(false)]
public virtual Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return null;
}
// Token: 0x06001848 RID: 6216 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001848")]
[Address(RVA = "0xCCC5D0", Offset = "0xCCB5D0", VA = "0x180CCC5D0")]
private Task<int> BeginEndReadAsync(byte[] buffer, int offset, int count)
{
return null;
}
/// <summary>Begins an asynchronous write operation. (Consider using <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> instead.)</summary>
/// <param name="buffer">The buffer to write data from.</param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> from which to begin writing.</param>
/// <param name="count">The maximum number of bytes to write.</param>
/// <param name="callback">An optional asynchronous callback, to be called when the write is complete.</param>
/// <param name="state">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
/// <returns>An <see langword="IAsyncResult" /> that represents the asynchronous write, which could still be pending.</returns>
/// <exception cref="T:System.IO.IOException">Attempted an asynchronous write past the end of the stream, or a disk error occurs.</exception>
/// <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
/// <exception cref="T:System.NotSupportedException">The current <see langword="Stream" /> implementation does not support the write operation.</exception>
// Token: 0x06001849 RID: 6217 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001849")]
[Address(RVA = "0xCCCDC0", Offset = "0xCCBDC0", VA = "0x180CCCDC0", Slot = "22")]
public virtual IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x0600184A RID: 6218 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600184A")]
[Address(RVA = "0xCCCBA0", Offset = "0xCCBBA0", VA = "0x180CCCBA0")]
internal IAsyncResult BeginWriteInternal(byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously)
{
return null;
}
// Token: 0x0600184B RID: 6219 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600184B")]
[Address(RVA = "0xCCDEF0", Offset = "0xCCCEF0", VA = "0x180CCDEF0")]
private void RunReadWriteTaskWhenReady(Task asyncWaiter, Stream.ReadWriteTask readWriteTask)
{
}
// Token: 0x0600184C RID: 6220 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600184C")]
[Address(RVA = "0xCCE0D0", Offset = "0xCCD0D0", VA = "0x180CCE0D0")]
private void RunReadWriteTask(Stream.ReadWriteTask readWriteTask)
{
}
/// <summary>Ends an asynchronous write operation. (Consider using <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> instead.)</summary>
/// <param name="asyncResult">A reference to the outstanding asynchronous I/O request.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="asyncResult" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">A handle to the pending write operation is not available.
/// -or-
/// The pending operation does not support writing.</exception>
/// <exception cref="T:System.InvalidOperationException">
/// <paramref name="asyncResult" /> did not originate from a <see cref="M:System.IO.Stream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> method on the current stream.</exception>
/// <exception cref="T:System.IO.IOException">The stream is closed or an internal error has occurred.</exception>
// Token: 0x0600184D RID: 6221 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600184D")]
[Address(RVA = "0xCCD640", Offset = "0xCCC640", VA = "0x180CCD640", Slot = "23")]
public virtual void EndWrite(IAsyncResult asyncResult)
{
}
/// <summary>Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</summary>
/// <param name="buffer">The buffer to write data from.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> from which to begin copying bytes to the stream.</param>
/// <param name="count">The maximum number of bytes to write.</param>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is larger than the buffer length.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream has been disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The stream is currently in use by a previous write operation.</exception>
// Token: 0x0600184E RID: 6222 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600184E")]
[Address(RVA = "0xCCE1A0", Offset = "0xCCD1A0", VA = "0x180CCE1A0")]
[ComVisible(false)]
public Task WriteAsync(byte[] buffer, int offset, int count)
{
return null;
}
/// <summary>Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.</summary>
/// <param name="buffer">The buffer to write data from.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> from which to begin copying bytes to the stream.</param>
/// <param name="count">The maximum number of bytes to write.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is larger than the buffer length.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream has been disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The stream is currently in use by a previous write operation.</exception>
// Token: 0x0600184F RID: 6223 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600184F")]
[Address(RVA = "0xCCE240", Offset = "0xCCD240", VA = "0x180CCE240", Slot = "24")]
[ComVisible(false)]
public virtual Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return null;
}
// Token: 0x06001850 RID: 6224 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001850")]
[Address(RVA = "0xCCC790", Offset = "0xCCB790", VA = "0x180CCC790")]
private Task BeginEndWriteAsync(byte[] buffer, int offset, int count)
{
return null;
}
/// <summary>When overridden in a derived class, sets the position within the current stream.</summary>
/// <param name="offset">A byte offset relative to the <paramref name="origin" /> parameter.</param>
/// <param name="origin">A value of type <see cref="T:System.IO.SeekOrigin" /> indicating the reference point used to obtain the new position.</param>
/// <returns>The new position within the current stream.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking, such as if the stream is constructed from a pipe or console output.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x06001851 RID: 6225
[Token(Token = "0x6001851")]
[Address(Slot = "25")]
public abstract long Seek(long offset, SeekOrigin origin);
/// <summary>When overridden in a derived class, sets the length of the current stream.</summary>
/// <param name="value">The desired length of the current stream in bytes.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x06001852 RID: 6226
[Token(Token = "0x6001852")]
[Address(Slot = "26")]
public abstract void SetLength(long value);
/// <summary>When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.</summary>
/// <param name="buffer">An array of bytes. When this method returns, the buffer contains the specified byte array with the values between <paramref name="offset" /> and (<paramref name="offset" /> + <paramref name="count" /> - 1) replaced by the bytes read from the current source.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> at which to begin storing the data read from the current stream.</param>
/// <param name="count">The maximum number of bytes to be read from the current stream.</param>
/// <returns>The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</returns>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is larger than the buffer length.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support reading.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x06001853 RID: 6227
[Token(Token = "0x6001853")]
[Address(Slot = "27")]
public abstract int Read([In] [Out] byte[] buffer, int offset, int count);
/// <summary>Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.</summary>
/// <returns>The unsigned byte cast to an <see langword="Int32" />, or -1 if at the end of the stream.</returns>
/// <exception cref="T:System.NotSupportedException">The stream does not support reading.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x06001854 RID: 6228 RVA: 0x000107E8 File Offset: 0x0000E9E8
[Token(Token = "0x6001854")]
[Address(RVA = "0xCCDE40", Offset = "0xCCCE40", VA = "0x180CCDE40", Slot = "28")]
public virtual int ReadByte()
{
return 0;
}
/// <summary>When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</summary>
/// <param name="buffer">An array of bytes. This method copies <paramref name="count" /> bytes from <paramref name="buffer" /> to the current stream.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> at which to begin copying bytes to the current stream.</param>
/// <param name="count">The number of bytes to be written to the current stream.</param>
/// <exception cref="T:System.ArgumentException">The sum of <paramref name="offset" /> and <paramref name="count" /> is greater than the buffer length.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.IO.IOException">An I/O error occured, such as the specified file cannot be found.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing.</exception>
/// <exception cref="T:System.ObjectDisposedException">
/// <see cref="M:System.IO.Stream.Write(System.Byte[],System.Int32,System.Int32)" /> was called after the stream was closed.</exception>
// Token: 0x06001855 RID: 6229
[Token(Token = "0x6001855")]
[Address(Slot = "29")]
public abstract void Write(byte[] buffer, int offset, int count);
/// <summary>Writes a byte to the current position in the stream and advances the position within the stream by one byte.</summary>
/// <param name="value">The byte to write to the stream.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing, or the stream is already closed.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
// Token: 0x06001856 RID: 6230 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001856")]
[Address(RVA = "0xCCE450", Offset = "0xCCD450", VA = "0x180CCE450", Slot = "30")]
public virtual void WriteByte(byte value)
{
}
// Token: 0x06001857 RID: 6231 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001857")]
[Address(RVA = "0xCCCDF0", Offset = "0xCCBDF0", VA = "0x180CCCDF0")]
internal IAsyncResult BlockingBeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x06001858 RID: 6232 RVA: 0x00010800 File Offset: 0x0000EA00
[Token(Token = "0x6001858")]
[Address(RVA = "0xCCCFD0", Offset = "0xCCBFD0", VA = "0x180CCCFD0")]
internal static int BlockingEndRead(IAsyncResult asyncResult)
{
return 0;
}
// Token: 0x06001859 RID: 6233 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001859")]
[Address(RVA = "0xCCCEE0", Offset = "0xCCBEE0", VA = "0x180CCCEE0")]
internal IAsyncResult BlockingBeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x0600185A RID: 6234 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185A")]
[Address(RVA = "0xCCD060", Offset = "0xCCC060", VA = "0x180CCD060")]
internal static void BlockingEndWrite(IAsyncResult asyncResult)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.IO.Stream" /> class.</summary>
// Token: 0x0600185B RID: 6235 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185B")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
protected Stream()
{
}
/// <summary>A <see langword="Stream" /> with no backing store.</summary>
// Token: 0x04000CF0 RID: 3312
[Token(Token = "0x4000CF0")]
public static readonly Stream Null;
// Token: 0x04000CF1 RID: 3313
[Token(Token = "0x4000CF1")]
private const int _DefaultCopyBufferSize = 81920;
// Token: 0x04000CF2 RID: 3314
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4000CF2")]
[NonSerialized]
private Stream.ReadWriteTask _activeReadWriteTask;
// Token: 0x04000CF3 RID: 3315
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4000CF3")]
[NonSerialized]
private SemaphoreSlim _asyncActiveSemaphore;
// Token: 0x0200029D RID: 669
[Token(Token = "0x200029D")]
private struct ReadWriteParameters
{
// Token: 0x04000CF4 RID: 3316
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4000CF4")]
internal byte[] Buffer;
// Token: 0x04000CF5 RID: 3317
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
[Token(Token = "0x4000CF5")]
internal int Offset;
// Token: 0x04000CF6 RID: 3318
[global::Cpp2IlInjected.FieldOffset(Offset = "0xC")]
[Token(Token = "0x4000CF6")]
internal int Count;
}
// Token: 0x0200029E RID: 670
[Token(Token = "0x200029E")]
private sealed class ReadWriteTask : Task<int>, ITaskCompletionAction
{
// Token: 0x0600185D RID: 6237 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185D")]
[Address(RVA = "0xCC9450", Offset = "0xCC8450", VA = "0x180CC9450")]
internal void ClearBeginState()
{
}
// Token: 0x0600185E RID: 6238 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185E")]
[Address(RVA = "0xCC9620", Offset = "0xCC8620", VA = "0x180CC9620")]
public ReadWriteTask(bool isRead, Func<object, int> function, object state, Stream stream, byte[] buffer, int offset, int count, AsyncCallback callback)
{
}
// Token: 0x0600185F RID: 6239 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185F")]
[Address(RVA = "0xCC9460", Offset = "0xCC8460", VA = "0x180CC9460")]
private static void InvokeAsyncCallback(object completedTask)
{
}
// Token: 0x06001860 RID: 6240 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001860")]
[Address(RVA = "0xCC94D0", Offset = "0xCC84D0", VA = "0x180CC94D0", Slot = "22")]
void ITaskCompletionAction.Invoke(Task completingTask)
{
}
// Token: 0x04000CF7 RID: 3319
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x4000CF7")]
internal readonly bool _isRead;
// Token: 0x04000CF8 RID: 3320
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x4000CF8")]
internal Stream _stream;
// Token: 0x04000CF9 RID: 3321
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
[Token(Token = "0x4000CF9")]
internal byte[] _buffer;
// Token: 0x04000CFA RID: 3322
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
[Token(Token = "0x4000CFA")]
internal int _offset;
// Token: 0x04000CFB RID: 3323
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
[Token(Token = "0x4000CFB")]
internal int _count;
// Token: 0x04000CFC RID: 3324
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
[Token(Token = "0x4000CFC")]
private AsyncCallback _callback;
// Token: 0x04000CFD RID: 3325
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
[Token(Token = "0x4000CFD")]
private ExecutionContext _context;
// Token: 0x04000CFE RID: 3326
[Token(Token = "0x4000CFE")]
private static ContextCallback s_invokeAsyncCallback;
}
// Token: 0x0200029F RID: 671
[Token(Token = "0x200029F")]
[Serializable]
private sealed class NullStream : Stream
{
// Token: 0x06001861 RID: 6241 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001861")]
[Address(RVA = "0xCC4610", Offset = "0xCC3610", VA = "0x180CC4610")]
internal NullStream()
{
}
// Token: 0x170002E9 RID: 745
// (get) Token: 0x06001862 RID: 6242 RVA: 0x00010818 File Offset: 0x0000EA18
[Token(Token = "0x170002E9")]
public override bool CanRead
{
[Token(Token = "0x6001862")]
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
get
{
return default(bool);
}
}
// Token: 0x170002EA RID: 746
// (get) Token: 0x06001863 RID: 6243 RVA: 0x00010830 File Offset: 0x0000EA30
[Token(Token = "0x170002EA")]
public override bool CanWrite
{
[Token(Token = "0x6001863")]
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "9")]
get
{
return default(bool);
}
}
// Token: 0x170002EB RID: 747
// (get) Token: 0x06001864 RID: 6244 RVA: 0x00010848 File Offset: 0x0000EA48
[Token(Token = "0x170002EB")]
public override bool CanSeek
{
[Token(Token = "0x6001864")]
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "8")]
get
{
return default(bool);
}
}
// Token: 0x170002EC RID: 748
// (get) Token: 0x06001865 RID: 6245 RVA: 0x00010860 File Offset: 0x0000EA60
[Token(Token = "0x170002EC")]
public override long Length
{
[Token(Token = "0x6001865")]
[Address(RVA = "0x4242C0", Offset = "0x4232C0", VA = "0x1804242C0", Slot = "10")]
get
{
return 0L;
}
}
// Token: 0x170002ED RID: 749
// (get) Token: 0x06001866 RID: 6246 RVA: 0x00010878 File Offset: 0x0000EA78
// (set) Token: 0x06001867 RID: 6247 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x170002ED")]
public override long Position
{
[Token(Token = "0x6001866")]
[Address(RVA = "0x4242C0", Offset = "0x4232C0", VA = "0x1804242C0", Slot = "11")]
get
{
return 0L;
}
[Token(Token = "0x6001867")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "12")]
set
{
}
}
// Token: 0x06001868 RID: 6248 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001868")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "16")]
protected override void Dispose(bool disposing)
{
}
// Token: 0x06001869 RID: 6249 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001869")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "17")]
public override void Flush()
{
}
// Token: 0x0600186A RID: 6250 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600186A")]
[Address(RVA = "0xCC4420", Offset = "0xCC3420", VA = "0x180CC4420", Slot = "18")]
[ComVisible(false)]
public override Task FlushAsync(CancellationToken cancellationToken)
{
return null;
}
// Token: 0x0600186B RID: 6251 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600186B")]
[Address(RVA = "0xCC4220", Offset = "0xCC3220", VA = "0x180CC4220", Slot = "19")]
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x0600186C RID: 6252 RVA: 0x00010890 File Offset: 0x0000EA90
[Token(Token = "0x600186C")]
[Address(RVA = "0xCC4300", Offset = "0xCC3300", VA = "0x180CC4300", Slot = "20")]
public override int EndRead(IAsyncResult asyncResult)
{
return 0;
}
// Token: 0x0600186D RID: 6253 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600186D")]
[Address(RVA = "0xCC4290", Offset = "0xCC3290", VA = "0x180CC4290", Slot = "22")]
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return null;
}
// Token: 0x0600186E RID: 6254 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600186E")]
[Address(RVA = "0xCC4390", Offset = "0xCC3390", VA = "0x180CC4390", Slot = "23")]
public override void EndWrite(IAsyncResult asyncResult)
{
}
// Token: 0x0600186F RID: 6255 RVA: 0x000108A8 File Offset: 0x0000EAA8
[Token(Token = "0x600186F")]
[Address(RVA = "0x4242C0", Offset = "0x4232C0", VA = "0x1804242C0", Slot = "27")]
public override int Read([In] [Out] byte[] buffer, int offset, int count)
{
return 0;
}
// Token: 0x06001870 RID: 6256 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001870")]
[Address(RVA = "0xCC44C0", Offset = "0xCC34C0", VA = "0x180CC44C0", Slot = "21")]
[ComVisible(false)]
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return null;
}
// Token: 0x06001871 RID: 6257 RVA: 0x000108C0 File Offset: 0x0000EAC0
[Token(Token = "0x6001871")]
[Address(RVA = "0x716A60", Offset = "0x715A60", VA = "0x180716A60", Slot = "28")]
public override int ReadByte()
{
return 0;
}
// Token: 0x06001872 RID: 6258 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001872")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "29")]
public override void Write(byte[] buffer, int offset, int count)
{
}
// Token: 0x06001873 RID: 6259 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001873")]
[Address(RVA = "0xCC4580", Offset = "0xCC3580", VA = "0x180CC4580", Slot = "24")]
[ComVisible(false)]
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return null;
}
// Token: 0x06001874 RID: 6260 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001874")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "30")]
public override void WriteByte(byte value)
{
}
// Token: 0x06001875 RID: 6261 RVA: 0x000108D8 File Offset: 0x0000EAD8
[Token(Token = "0x6001875")]
[Address(RVA = "0x4242C0", Offset = "0x4232C0", VA = "0x1804242C0", Slot = "25")]
public override long Seek(long offset, SeekOrigin origin)
{
return 0L;
}
// Token: 0x06001876 RID: 6262 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001876")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "26")]
public override void SetLength(long length)
{
}
// Token: 0x04000CFF RID: 3327
[Token(Token = "0x4000CFF")]
private static Task<int> s_nullReadTask;
}
// Token: 0x020002A0 RID: 672
[Token(Token = "0x20002A0")]
internal sealed class SynchronousAsyncResult : IAsyncResult
{
// Token: 0x06001877 RID: 6263 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001877")]
[Address(RVA = "0xCCF600", Offset = "0xCCE600", VA = "0x180CCF600")]
internal SynchronousAsyncResult(int bytesRead, object asyncStateObject)
{
}
// Token: 0x06001878 RID: 6264 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001878")]
[Address(RVA = "0xC039D0", Offset = "0xC029D0", VA = "0x180C039D0")]
internal SynchronousAsyncResult(object asyncStateObject)
{
}
// Token: 0x06001879 RID: 6265 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001879")]
[Address(RVA = "0xCCF5A0", Offset = "0xCCE5A0", VA = "0x180CCF5A0")]
internal SynchronousAsyncResult(Exception ex, object asyncStateObject, bool isWrite)
{
}
// Token: 0x170002EE RID: 750
// (get) Token: 0x0600187A RID: 6266 RVA: 0x000108F0 File Offset: 0x0000EAF0
[Token(Token = "0x170002EE")]
public bool IsCompleted
{
[Token(Token = "0x600187A")]
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "4")]
get
{
return default(bool);
}
}
// Token: 0x170002EF RID: 751
// (get) Token: 0x0600187B RID: 6267 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170002EF")]
public WaitHandle AsyncWaitHandle
{
[Token(Token = "0x600187B")]
[Address(RVA = "0xCCF640", Offset = "0xCCE640", VA = "0x180CCF640", Slot = "5")]
get
{
return null;
}
}
// Token: 0x170002F0 RID: 752
// (get) Token: 0x0600187C RID: 6268 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170002F0")]
public object AsyncState
{
[Token(Token = "0x600187C")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "6")]
get
{
return null;
}
}
// Token: 0x170002F1 RID: 753
// (get) Token: 0x0600187D RID: 6269 RVA: 0x00010908 File Offset: 0x0000EB08
[Token(Token = "0x170002F1")]
public bool CompletedSynchronously
{
[Token(Token = "0x600187D")]
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
get
{
return default(bool);
}
}
// Token: 0x0600187E RID: 6270 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600187E")]
[Address(RVA = "0xCCF580", Offset = "0xCCE580", VA = "0x180CCF580")]
internal void ThrowIfError()
{
}
// Token: 0x0600187F RID: 6271 RVA: 0x00010920 File Offset: 0x0000EB20
[Token(Token = "0x600187F")]
[Address(RVA = "0xCCCFD0", Offset = "0xCCBFD0", VA = "0x180CCCFD0")]
internal static int EndRead(IAsyncResult asyncResult)
{
return 0;
}
// Token: 0x06001880 RID: 6272 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001880")]
[Address(RVA = "0xCCD060", Offset = "0xCCC060", VA = "0x180CCD060")]
internal static void EndWrite(IAsyncResult asyncResult)
{
}
// Token: 0x04000D00 RID: 3328
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4000D00")]
private readonly object _stateObject;
// Token: 0x04000D01 RID: 3329
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4000D01")]
private readonly bool _isWrite;
// Token: 0x04000D02 RID: 3330
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4000D02")]
private ManualResetEvent _waitHandle;
// Token: 0x04000D03 RID: 3331
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4000D03")]
private ExceptionDispatchInfo _exceptionInfo;
// Token: 0x04000D04 RID: 3332
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4000D04")]
private bool _endXxxCalled;
// Token: 0x04000D05 RID: 3333
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
[Token(Token = "0x4000D05")]
private int _bytesRead;
}
}
}