342 lines
15 KiB
C#
342 lines
15 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Collections.Concurrent
|
|
{
|
|
/// <summary>Represents a thread-safe first in-first out (FIFO) collection.</summary>
|
|
/// <typeparam name="T">The type of the elements contained in the queue.</typeparam>
|
|
// Token: 0x020005FC RID: 1532
|
|
[Token(Token = "0x20005FC")]
|
|
[DebuggerTypeProxy(typeof(IProducerConsumerCollectionDebugView<>))]
|
|
[DebuggerDisplay("Count = {Count}")]
|
|
[Serializable]
|
|
public class ConcurrentQueue<T> : IEnumerable<T>, IEnumerable, ICollection, IReadOnlyCollection<T>
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> class.</summary>
|
|
// Token: 0x06002FF8 RID: 12280 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002FF8")]
|
|
[Address(RVA = "0x3610B40", Offset = "0x360FB40", VA = "0x183610B40")]
|
|
public ConcurrentQueue()
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</summary>
|
|
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from the <see cref="T:System.Collections.Concurrent.ConcurrentBag`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
|
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="array" /> is a null reference (Nothing in Visual Basic).</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="index" /> is less than zero.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="array" /> is multidimensional. -or- <paramref name="array" /> does not have zero-based indexing. -or- <paramref name="index" /> is equal to or greater than the length of the <paramref name="array" /> -or- The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. -or- The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
|
// Token: 0x06002FF9 RID: 12281 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002FF9")]
|
|
[Address(RVA = "0x3610490", Offset = "0x360F490", VA = "0x183610490", Slot = "6")]
|
|
void ICollection.CopyTo(Array array, int index)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized with the SyncRoot.</summary>
|
|
/// <returns>Always returns <see langword="false" /> to indicate access is not synchronized.</returns>
|
|
// Token: 0x17000795 RID: 1941
|
|
// (get) Token: 0x06002FFA RID: 12282 RVA: 0x0001A3A0 File Offset: 0x000185A0
|
|
[Token(Token = "0x17000795")]
|
|
bool ICollection.IsSynchronized
|
|
{
|
|
[Token(Token = "0x6002FFA")]
|
|
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "9")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. This property is not supported.</summary>
|
|
/// <returns>Returns null (Nothing in Visual Basic).</returns>
|
|
/// <exception cref="T:System.NotSupportedException">The SyncRoot property is not supported.</exception>
|
|
// Token: 0x17000796 RID: 1942
|
|
// (get) Token: 0x06002FFB RID: 12283 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000796")]
|
|
object ICollection.SyncRoot
|
|
{
|
|
[Token(Token = "0x6002FFB")]
|
|
[Address(RVA = "0x36105B0", Offset = "0x360F5B0", VA = "0x1836105B0", Slot = "8")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
|
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
|
// Token: 0x06002FFC RID: 12284 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002FFC")]
|
|
[Address(RVA = "0x3610610", Offset = "0x360F610", VA = "0x183610610", Slot = "5")]
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Copies the elements stored in the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> to a new array.</summary>
|
|
/// <returns>A new array containing a snapshot of elements copied from the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</returns>
|
|
// Token: 0x06002FFD RID: 12285 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002FFD")]
|
|
[Address(RVA = "0x3610660", Offset = "0x360F660", VA = "0x183610660", Slot = "11")]
|
|
public T[] ToArray()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</summary>
|
|
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</returns>
|
|
// Token: 0x17000797 RID: 1943
|
|
// (get) Token: 0x06002FFE RID: 12286 RVA: 0x0001A3B8 File Offset: 0x000185B8
|
|
[Token(Token = "0x17000797")]
|
|
public int Count
|
|
{
|
|
[Token(Token = "0x6002FFE")]
|
|
[Address(RVA = "0x3610C10", Offset = "0x360FC10", VA = "0x183610C10", Slot = "10")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002FFF RID: 12287 RVA: 0x0001A3D0 File Offset: 0x000185D0
|
|
[Token(Token = "0x6002FFF")]
|
|
[Address(RVA = "0x360FEF0", Offset = "0x360EEF0", VA = "0x18360FEF0")]
|
|
private static int GetCount(ConcurrentQueue<T>.Segment s, int head, int tail)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06003000 RID: 12288 RVA: 0x0001A3E8 File Offset: 0x000185E8
|
|
[Token(Token = "0x6003000")]
|
|
[Address(RVA = "0x360FFD0", Offset = "0x360EFD0", VA = "0x18360FFD0")]
|
|
private static long GetCount(ConcurrentQueue<T>.Segment head, int headHead, ConcurrentQueue<T>.Segment tail, int tailTail)
|
|
{
|
|
return 0L;
|
|
}
|
|
|
|
/// <summary>Copies the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> elements to an existing one-dimensional <see cref="T:System.Array" />, starting at the specified array index.</summary>
|
|
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
|
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="array" /> is a null reference (Nothing in Visual Basic).</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="index" /> is less than zero.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="index" /> is equal to or greater than the length of the <paramref name="array" /> -or- The number of elements in the source <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
|
// Token: 0x06003001 RID: 12289 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6003001")]
|
|
[Address(RVA = "0x360F8A0", Offset = "0x360E8A0", VA = "0x18360F8A0", Slot = "12")]
|
|
public void CopyTo(T[] array, int index)
|
|
{
|
|
}
|
|
|
|
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</summary>
|
|
/// <returns>An enumerator for the contents of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</returns>
|
|
// Token: 0x06003002 RID: 12290 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6003002")]
|
|
[Address(RVA = "0x36101A0", Offset = "0x360F1A0", VA = "0x1836101A0", Slot = "4")]
|
|
public IEnumerator<T> GetEnumerator()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06003003 RID: 12291 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6003003")]
|
|
[Address(RVA = "0x3610330", Offset = "0x360F330", VA = "0x183610330")]
|
|
private void SnapForObservation(out ConcurrentQueue<T>.Segment head, out int headHead, out ConcurrentQueue<T>.Segment tail, out int tailTail)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06003004 RID: 12292 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6003004")]
|
|
[Address(RVA = "0x3610240", Offset = "0x360F240", VA = "0x183610240")]
|
|
private T GetItemWhenAvailable(ConcurrentQueue<T>.Segment segment, int i)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06003005 RID: 12293 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6003005")]
|
|
[Address(RVA = "0x360FE40", Offset = "0x360EE40", VA = "0x18360FE40")]
|
|
private IEnumerator<T> Enumerate(ConcurrentQueue<T>.Segment head, int headHead, ConcurrentQueue<T>.Segment tail, int tailTail)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</summary>
|
|
/// <param name="item">The object to add to the end of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />. The value can be a null reference (Nothing in Visual Basic) for reference types.</param>
|
|
// Token: 0x06003006 RID: 12294 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6003006")]
|
|
[Address(RVA = "0x360FDB0", Offset = "0x360EDB0", VA = "0x18360FDB0")]
|
|
public void Enqueue(T item)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06003007 RID: 12295 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6003007")]
|
|
[Address(RVA = "0x360FB50", Offset = "0x360EB50", VA = "0x18360FB50")]
|
|
private void EnqueueSlow(T item)
|
|
{
|
|
}
|
|
|
|
/// <summary>Tries to remove and return the object at the beginning of the concurrent queue.</summary>
|
|
/// <param name="result">When this method returns, if the operation was successful, <paramref name="result" /> contains the object removed. If no object was available to be removed, the value is unspecified.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if an element was removed and returned from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> successfully; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06003008 RID: 12296 RVA: 0x0001A400 File Offset: 0x00018600
|
|
[Token(Token = "0x6003008")]
|
|
[Address(RVA = "0x3610AB0", Offset = "0x360FAB0", VA = "0x183610AB0")]
|
|
public bool TryDequeue(out T result)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x06003009 RID: 12297 RVA: 0x0001A418 File Offset: 0x00018618
|
|
[Token(Token = "0x6003009")]
|
|
[Address(RVA = "0x3610900", Offset = "0x360F900", VA = "0x183610900")]
|
|
private bool TryDequeueSlow(out T item)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x04001ABE RID: 6846
|
|
[Token(Token = "0x4001ABE")]
|
|
private const int InitialSegmentLength = 32;
|
|
|
|
// Token: 0x04001ABF RID: 6847
|
|
[Token(Token = "0x4001ABF")]
|
|
private const int MaxSegmentLength = 1048576;
|
|
|
|
// Token: 0x04001AC0 RID: 6848
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC0")]
|
|
private object _crossSegmentLock;
|
|
|
|
// Token: 0x04001AC1 RID: 6849
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC1")]
|
|
private ConcurrentQueue<T>.Segment _tail;
|
|
|
|
// Token: 0x04001AC2 RID: 6850
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC2")]
|
|
private ConcurrentQueue<T>.Segment _head;
|
|
|
|
// Token: 0x020005FD RID: 1533
|
|
[Token(Token = "0x20005FD")]
|
|
[DebuggerDisplay("Capacity = {Capacity}")]
|
|
private sealed class Segment
|
|
{
|
|
// Token: 0x0600300A RID: 12298 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600300A")]
|
|
[Address(RVA = "0x3611CA0", Offset = "0x3610CA0", VA = "0x183611CA0")]
|
|
public Segment(int boundedLength)
|
|
{
|
|
}
|
|
|
|
// Token: 0x17000798 RID: 1944
|
|
// (get) Token: 0x0600300B RID: 12299 RVA: 0x0001A430 File Offset: 0x00018630
|
|
[Token(Token = "0x17000798")]
|
|
internal int Capacity
|
|
{
|
|
[Token(Token = "0x600300B")]
|
|
[Address(RVA = "0x73E8F0", Offset = "0x73D8F0", VA = "0x18073E8F0")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000799 RID: 1945
|
|
// (get) Token: 0x0600300C RID: 12300 RVA: 0x0001A448 File Offset: 0x00018648
|
|
[Token(Token = "0x17000799")]
|
|
internal int FreezeOffset
|
|
{
|
|
[Token(Token = "0x600300C")]
|
|
[Address(RVA = "0x3611D60", Offset = "0x3610D60", VA = "0x183611D60")]
|
|
get
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600300D RID: 12301 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600300D")]
|
|
[Address(RVA = "0x36118F0", Offset = "0x36108F0", VA = "0x1836118F0")]
|
|
internal void EnsureFrozenForEnqueues()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600300E RID: 12302 RVA: 0x0001A460 File Offset: 0x00018660
|
|
[Token(Token = "0x600300E")]
|
|
[Address(RVA = "0x3611990", Offset = "0x3610990", VA = "0x183611990")]
|
|
public bool TryDequeue(out T item)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x0600300F RID: 12303 RVA: 0x0001A478 File Offset: 0x00018678
|
|
[Token(Token = "0x600300F")]
|
|
[Address(RVA = "0x3611B60", Offset = "0x3610B60", VA = "0x183611B60")]
|
|
public bool TryEnqueue(T item)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x04001AC3 RID: 6851
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC3")]
|
|
internal readonly ConcurrentQueue<T>.Segment.Slot[] _slots;
|
|
|
|
// Token: 0x04001AC4 RID: 6852
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC4")]
|
|
internal readonly int _slotsMask;
|
|
|
|
// Token: 0x04001AC5 RID: 6853
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC5")]
|
|
internal PaddedHeadAndTail _headAndTail;
|
|
|
|
// Token: 0x04001AC6 RID: 6854
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC6")]
|
|
internal bool _preservedForObservation;
|
|
|
|
// Token: 0x04001AC7 RID: 6855
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC7")]
|
|
internal bool _frozenForEnqueues;
|
|
|
|
// Token: 0x04001AC8 RID: 6856
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC8")]
|
|
internal ConcurrentQueue<T>.Segment _nextSegment;
|
|
|
|
// Token: 0x020005FE RID: 1534
|
|
[Token(Token = "0x20005FE")]
|
|
[DebuggerDisplay("Item = {Item}, SequenceNumber = {SequenceNumber}")]
|
|
[StructLayout(3)]
|
|
internal struct Slot
|
|
{
|
|
// Token: 0x04001AC9 RID: 6857
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001AC9")]
|
|
public T Item;
|
|
|
|
// Token: 0x04001ACA RID: 6858
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4001ACA")]
|
|
public int SequenceNumber;
|
|
}
|
|
}
|
|
}
|
|
}
|