ProducerConsumerQueueT - класс

Represents a first-in, first-out collection of objects extending QueueT class, and implements additional interface IProducerConsumerCollectionT.

Definition

Пространство имён: Tessa.Platform.Collections
Сборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
public class ProducerConsumerQueue<T> : Queue<T>, 
	IProducerConsumerCollection<T>, IEnumerable<T>, IEnumerable, ICollection
Inheritance
Object    QueueT    ProducerConsumerQueueT
Implements
IProducerConsumerCollectionT, IEnumerableT, ICollection, IEnumerable

Параметры типа

T
Specifies the type of elements in the queue.

Конструкторы

ProducerConsumerQueueTInitializes a new instance of the QueueT class that is empty and has the default initial capacity.
ProducerConsumerQueueT(IEnumerableT)Initializes a new instance of the QueueT class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
ProducerConsumerQueueT(Int32)Initializes a new instance of the QueueT class that is empty and has the specified initial capacity.

Свойства

CapacityGets the total numbers of elements the internal data structure can hold without resizing.
(Унаследован от QueueT)
CountGets the number of elements contained in the QueueT.
(Унаследован от QueueT)

Методы

ClearRemoves all objects from the QueueT.
(Унаследован от QueueT)
ContainsDetermines whether an element is in the QueueT.
(Унаследован от QueueT)
CopyToCopies the QueueT elements to an existing one-dimensional Array, starting at the specified array index.
(Унаследован от QueueT)
DequeueRemoves and returns the object at the beginning of the QueueT.
(Унаследован от QueueT)
EnqueueAdds an object to the end of the QueueT.
(Унаследован от QueueT)
EnsureCapacityEnsures that the capacity of this queue is at least the specified capacity. If the current capacity is less than capacity, it is increased to at least the specified capacity.
(Унаследован от QueueT)
EqualsDetermines whether the specified object is equal to the current object.
(Унаследован от Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Унаследован от Object)
GetEnumeratorReturns an enumerator that iterates through the QueueT.
(Унаследован от QueueT)
GetHashCodeServes as the default hash function.
(Унаследован от Object)
GetTypeGets the Type of the current instance.
(Унаследован от Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Унаследован от Object)
PeekReturns the object at the beginning of the QueueT without removing it.
(Унаследован от QueueT)
ToArrayCopies the QueueT elements to a new array.
(Унаследован от QueueT)
ToStringReturns a string that represents the current object.
(Унаследован от Object)
TrimExcessSets the capacity to the actual number of elements in the QueueT, if that number is less than 90 percent of current capacity.
(Унаследован от QueueT)
TrimExcess(Int32)Sets the capacity of a QueueT object to the specified number of entries.
(Унаследован от QueueT)
TryDequeue
(Унаследован от QueueT)
TryPeek
(Унаследован от QueueT)

Методы расширения

AllOrNullT Определяет отвечают ли все элементы последовательности переданному предикату.
(Определяется PlatformExtensions)
AsArrayT Преобразует перечисление в массив. В случае, если перечисление не является массивом, к нему применяется ToArrayTSource(IEnumerableTSource).
(Определяется CollectionsExtensions)
AsArrayOrIListT Преобразует перечисление в список IListT, доступный только для чтения, или в массив. В случае, если перечисление не является списком или массивом, к нему применяется ToArrayTSource(IEnumerableTSource).
(Определяется CollectionsExtensions)
AsReadOnlyCollectionT Преобразует перечисление в коллекцию, доступную только для чтения. В случае, если перечисление не является коллекцией IReadOnlyCollectionT, но является объектом IListT, к нему применяется AsReadOnlyT(IListT), иначе к нему применяется ToImmutableListTSource(IEnumerableTSource).
(Определяется CollectionsExtensions)
AsReadOnlyListT Преобразует перечисление в список, доступный только для чтения. В случае, если перечисление не является списком IReadOnlyListT, но является объектом IListT, к нему применяется AsReadOnlyT(IListT), иначе к нему применяется ToImmutableListTSource(IEnumerableTSource).
(Определяется CollectionsExtensions)
ForEachT Выполняет указанное действие с каждым элементом коллекции IEnumerableT.
(Определяется CollectionsExtensions)
FullOuterJoinT, TInner, TKey, TResult Объединяет две последовательности по алгоритму FULL OUTER JOIN.
(Определяется CollectionsExtensions)
IndexOfT Возвращает индекс первого вхождения элемента в последовательность, определяемый посредством заданного выражения.
(Определяется CollectionsExtensions)
IndexOfT Возвращает индекс первого вхождения элемента в последовательность, определяемый посредством заданного компаратора IEqualityComparerT.
(Определяется CollectionsExtensions)
OrderByAttributeAndTypeT

Сортирует элементы с учётом атрибута OrderAttribute на типах объектов.

Если атрибут отсутствует или элемент равен null - подразумевается 0. Если несколько зависимостей имеют одинаковый порядок, то они сортируются по краткому имени типа элемента (без пространства имён), а при его совпадении - по квалифицированному имени типа (с учётом пространства имён и названия сборки).


(Определяется PlatformExtensions)
OrderByDbmsBaseT Метод для сортировки списка в порядке по возрастанию с учётом особенностей СУБД.
(Определяется DataExtensions)
OrderByDependenciesT
(Определяется CollectionsExtensions)
OrderByDependenciesT
(Определяется CollectionsExtensions)
OrderByDependenciesT, TKey
(Определяется CollectionsExtensions)
OrderByDependenciesT, TKey
(Определяется CollectionsExtensions)
OrderByDescendingDbmsBaseT Метод для сортировки списка в порядке по убыванию с учётом особенностей СУБД.
(Определяется DataExtensions)
OrderByLocalizedT Сортирует значения последовательности по возрастанию по локализованному ключу, который определяется для каждого элемента.
(Определяется PlatformExtensions)
OrderByLocalizedDescendingT Сортирует значения последовательности по убыванию по локализованному ключу, который определяется для каждого элемента.
(Определяется PlatformExtensions)
OrderByNoteItemGroupT Сортирует объекты по группе NoteItemGroup с учётом переданного порядка групп orderedGroups.
(Определяется NotesExtensions)
RunWithMaxDegreeOfParallelismAsyncT Выполняет асинхронную обработку элементов с ограничением на максимальное количество параллельных задач.
(Определяется PlatformExtensions)
ToDictionaryAsyncT, TKey, TElement Создает словарь DictionaryTKey, TValue из объекта IEnumerableT в соответствии с заданными функциями синхронного селектора ключа и асинхронного селектора значения.
(Определяется PlatformExtensions)
ToObservableCollectionT Преобразует коллекцию IEnumerable в ObservableCollection
(Определяется CollectionsExtensions)
ToSealableListT Возвращает список объектов, поддерживающий защиту от изменений. Каждый из объектов T в списке либо не реализует интерфейс ISealable, либо защита от изменений таких объектов не активируется вместе со списком.
(Определяется CollectionsExtensions)
TryFirstT Возвращает первый элемент последовательности, удовлетворяющий условию.
(Определяется CollectionsExtensions)
TrySingleOrDefaultT Возвращает единственный конкретный элемент коллекции или значение по умолчанию для типа, если этот элемент не найден.
(Определяется CollectionsExtensions)
WithPreviousAndNextT
(Определяется EnumerableExtensions)

См. также