using System;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Cpp2IlInjected;
namespace System.IO
{
/// Provides a generic view of a sequence of bytes. This is an abstract class.
// 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;
}
/// When overridden in a derived class, gets a value indicating whether the current stream supports reading.
///
/// if the stream supports reading; otherwise, .
// Token: 0x170002E2 RID: 738
// (get) Token: 0x06001835 RID: 6197
[Token(Token = "0x170002E2")]
public abstract bool CanRead
{
[Token(Token = "0x6001835")]
[Address(Slot = "7")]
get;
}
/// When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
///
/// if the stream supports seeking; otherwise, .
// Token: 0x170002E3 RID: 739
// (get) Token: 0x06001836 RID: 6198
[Token(Token = "0x170002E3")]
public abstract bool CanSeek
{
[Token(Token = "0x6001836")]
[Address(Slot = "8")]
get;
}
/// When overridden in a derived class, gets a value indicating whether the current stream supports writing.
///
/// if the stream supports writing; otherwise, .
// Token: 0x170002E4 RID: 740
// (get) Token: 0x06001837 RID: 6199
[Token(Token = "0x170002E4")]
public abstract bool CanWrite
{
[Token(Token = "0x6001837")]
[Address(Slot = "9")]
get;
}
/// When overridden in a derived class, gets the length in bytes of the stream.
/// A long value representing the length of the stream in bytes.
/// A class derived from does not support seeking.
/// Methods were called after the stream was closed.
// Token: 0x170002E5 RID: 741
// (get) Token: 0x06001838 RID: 6200
[Token(Token = "0x170002E5")]
public abstract long Length
{
[Token(Token = "0x6001838")]
[Address(Slot = "10")]
get;
}
/// When overridden in a derived class, gets or sets the position within the current stream.
/// The current position within the stream.
/// An I/O error occurs.
/// The stream does not support seeking.
/// Methods were called after the stream was closed.
// 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;
}
/// Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
/// A value, in miliseconds, that determines how long the stream will attempt to read before timing out.
/// The method always throws an .
// 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;
}
}
/// Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
/// A value, in miliseconds, that determines how long the stream will attempt to write before timing out.
/// The method always throws an .
// 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;
}
}
/// Reads the bytes from the current stream and writes them to another stream.
/// The stream to which the contents of the current stream will be copied.
///
/// is .
/// The current stream does not support reading.
/// -or-
/// does not support writing.
/// Either the current stream or were closed before the method was called.
/// An I/O error occurred.
// 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)
{
}
/// 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.
// 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()
{
}
/// Releases all resources used by the .
// Token: 0x06001840 RID: 6208 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001840")]
[Address(RVA = "0x9DE1B0", Offset = "0x9DD1B0", VA = "0x1809DE1B0", Slot = "6")]
public void Dispose()
{
}
/// Releases the unmanaged resources used by the and optionally releases the managed resources.
///
/// to release both managed and unmanaged resources; to release only unmanaged resources.
// 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)
{
}
/// When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
/// An I/O error occurs.
// Token: 0x06001842 RID: 6210
[Token(Token = "0x6001842")]
[Address(Slot = "17")]
public abstract void Flush();
/// Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.
/// The token to monitor for cancellation requests. The default value is .
/// A task that represents the asynchronous flush operation.
/// The stream has been disposed.
// 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;
}
/// Begins an asynchronous read operation. (Consider using instead.)
/// The buffer to read the data into.
/// The byte offset in at which to begin writing data read from the stream.
/// The maximum number of bytes to read.
/// An optional asynchronous callback, to be called when the read is complete.
/// A user-provided object that distinguishes this particular asynchronous read request from other requests.
/// An that represents the asynchronous read, which could still be pending.
/// Attempted an asynchronous read past the end of the stream, or a disk error occurs.
/// One or more of the arguments is invalid.
/// Methods were called after the stream was closed.
/// The current implementation does not support the read operation.
// 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;
}
/// Waits for the pending asynchronous read to complete. (Consider using instead.)
/// The reference to the pending asynchronous request to finish.
/// 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.
///
/// is .
/// A handle to the pending read operation is not available.
/// -or-
/// The pending operation does not support reading.
///
/// did not originate from a method on the current stream.
/// The stream is closed or an internal error has occurred.
// 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;
}
/// 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.
/// The buffer to write the data into.
/// The byte offset in at which to begin writing data from the stream.
/// The maximum number of bytes to read.
/// The token to monitor for cancellation requests. The default value is .
/// A task that represents the asynchronous read operation. The value of the 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.
///
/// is .
///
/// or is negative.
/// The sum of and is larger than the buffer length.
/// The stream does not support reading.
/// The stream has been disposed.
/// The stream is currently in use by a previous read operation.
// 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 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 BeginEndReadAsync(byte[] buffer, int offset, int count)
{
return null;
}
/// Begins an asynchronous write operation. (Consider using instead.)
/// The buffer to write data from.
/// The byte offset in from which to begin writing.
/// The maximum number of bytes to write.
/// An optional asynchronous callback, to be called when the write is complete.
/// A user-provided object that distinguishes this particular asynchronous write request from other requests.
/// An that represents the asynchronous write, which could still be pending.
/// Attempted an asynchronous write past the end of the stream, or a disk error occurs.
/// One or more of the arguments is invalid.
/// Methods were called after the stream was closed.
/// The current implementation does not support the write operation.
// 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)
{
}
/// Ends an asynchronous write operation. (Consider using instead.)
/// A reference to the outstanding asynchronous I/O request.
///
/// is .
/// A handle to the pending write operation is not available.
/// -or-
/// The pending operation does not support writing.
///
/// did not originate from a method on the current stream.
/// The stream is closed or an internal error has occurred.
// 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)
{
}
/// Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
/// The buffer to write data from.
/// The zero-based byte offset in from which to begin copying bytes to the stream.
/// The maximum number of bytes to write.
/// A task that represents the asynchronous write operation.
///
/// is .
///
/// or is negative.
/// The sum of and is larger than the buffer length.
/// The stream does not support writing.
/// The stream has been disposed.
/// The stream is currently in use by a previous write operation.
// 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;
}
/// 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.
/// The buffer to write data from.
/// The zero-based byte offset in from which to begin copying bytes to the stream.
/// The maximum number of bytes to write.
/// The token to monitor for cancellation requests. The default value is .
/// A task that represents the asynchronous write operation.
///
/// is .
///
/// or is negative.
/// The sum of and is larger than the buffer length.
/// The stream does not support writing.
/// The stream has been disposed.
/// The stream is currently in use by a previous write operation.
// 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;
}
/// When overridden in a derived class, sets the position within the current stream.
/// A byte offset relative to the parameter.
/// A value of type indicating the reference point used to obtain the new position.
/// The new position within the current stream.
/// An I/O error occurs.
/// The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
/// Methods were called after the stream was closed.
// Token: 0x06001851 RID: 6225
[Token(Token = "0x6001851")]
[Address(Slot = "25")]
public abstract long Seek(long offset, SeekOrigin origin);
/// When overridden in a derived class, sets the length of the current stream.
/// The desired length of the current stream in bytes.
/// An I/O error occurs.
/// The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
/// Methods were called after the stream was closed.
// Token: 0x06001852 RID: 6226
[Token(Token = "0x6001852")]
[Address(Slot = "26")]
public abstract void SetLength(long value);
/// 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.
/// An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source.
/// The zero-based byte offset in at which to begin storing the data read from the current stream.
/// The maximum number of bytes to be read from the current stream.
/// 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.
/// The sum of and is larger than the buffer length.
///
/// is .
///
/// or is negative.
/// An I/O error occurs.
/// The stream does not support reading.
/// Methods were called after the stream was closed.
// Token: 0x06001853 RID: 6227
[Token(Token = "0x6001853")]
[Address(Slot = "27")]
public abstract int Read([In] [Out] byte[] buffer, int offset, int count);
/// 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.
/// The unsigned byte cast to an , or -1 if at the end of the stream.
/// The stream does not support reading.
/// Methods were called after the stream was closed.
// 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;
}
/// 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.
/// An array of bytes. This method copies bytes from to the current stream.
/// The zero-based byte offset in at which to begin copying bytes to the current stream.
/// The number of bytes to be written to the current stream.
/// The sum of and is greater than the buffer length.
///
/// is .
///
/// or is negative.
/// An I/O error occured, such as the specified file cannot be found.
/// The stream does not support writing.
///
/// was called after the stream was closed.
// Token: 0x06001855 RID: 6229
[Token(Token = "0x6001855")]
[Address(Slot = "29")]
public abstract void Write(byte[] buffer, int offset, int count);
/// Writes a byte to the current position in the stream and advances the position within the stream by one byte.
/// The byte to write to the stream.
/// An I/O error occurs.
/// The stream does not support writing, or the stream is already closed.
/// Methods were called after the stream was closed.
// 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)
{
}
/// Initializes a new instance of the class.
// Token: 0x0600185B RID: 6235 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600185B")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
protected Stream()
{
}
/// A with no backing store.
// 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, 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