ImmutableStack<T> Класс
Определение
Представляет неизменяемый стек.Represents an immutable stack.
Пакет NuGet: System.Collections.Immutable (сведения о неизменяемых коллекциях и способах их установки)NuGet package: System.Collections.Immutable (about immutable collections and how to install)
generic <typename T>
public ref class ImmutableStack sealed : System::Collections::Generic::IEnumerable<T>, System::Collections::Immutable::IImmutableStack<T>
public sealed class ImmutableStack<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Immutable.IImmutableStack<T>
type ImmutableStack<'T> = class
interface seq<'T>
interface IEnumerable
interface IImmutableStack<'T>
Public NotInheritable Class ImmutableStack(Of T)
Implements IEnumerable(Of T), IImmutableStack(Of T)
Параметры типа
- T
Тип элемента в стеке.The type of element on the stack.
- Наследование
-
ImmutableStack<T>
- Реализации
Свойства
Empty |
Возвращает пустой неизменяемый стек.Gets an empty immutable stack. |
IsEmpty |
Возвращает значение, указывающее, является ли пустым этот экземпляр неизменяемого стека.Gets a value that indicates whether this instance of the immutable stack is empty. |
Методы
Clear() |
Удаляет все объекты из неизменяемого стека.Removes all objects from the immutable stack. |
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetEnumerator() |
Возвращает перечислитель, который выполняет перечисление элементов неизменяемого стека.Returns an enumerator that iterates through the immutable stack. |
GetHashCode() |
Служит в качестве хэш-функции по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
Peek() |
Возвращает верхний объект стека, не удаляя его.Returns the object at the top of the stack without removing it. |
PeekRef() |
Возвращает доступную только для чтения ссылку на элемент в начале стека.Gets a read-only reference to the element on the top of the stack. |
Pop() |
Удаляет верхний элемент из неизменяемого стека и возвращает стек после удаления.Removes the element at the top of the immutable stack and returns the stack after the removal. |
Pop(T) |
Удаляет указанный элемент из неизменяемого стека и возвращает стек после удаления.Removes the specified element from the immutable stack and returns the stack after the removal. |
Push(T) |
Добавляет верхний объект в неизменяемый стек и возвращает новый стек.Inserts an object at the top of the immutable stack and returns the new stack. |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |
Явные реализации интерфейса
IEnumerable.GetEnumerator() |
Возвращает перечислитель, который осуществляет итерацию по коллекции.Returns an enumerator that iterates through a collection. |
IEnumerable<T>.GetEnumerator() |
Возвращает перечислитель, выполняющий перебор элементов в коллекции.Returns an enumerator that iterates through the collection. |
IImmutableStack<T>.Clear() |
Удаляет все элементы из неизменяемого стека.Removes all elements from the immutable stack. |
IImmutableStack<T>.Pop() |
Удаляет верхний элемент из неизменяемого стека и возвращает новый стек.Removes the element at the top of the immutable stack and returns the new stack. |
IImmutableStack<T>.Push(T) |
Добавляет верхний элемент в неизменяемый стек и возвращает новый стек.Inserts an element at the top of the immutable stack and returns the new stack. |
Методы расширения
Pop<T>(IImmutableStack<T>, T) |
Удаляет из неизменяемого стека указанный элемент.Removes the specified item from an immutable stack. |
CopyToDataTable<T>(IEnumerable<T>) |
Возвращает объект DataTable, содержащий копии объектов DataRow при заданном входном объекте IEnumerable<T> и универсальном параметре |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
Копирует объекты DataRow в указанный объект DataTable с заданным входным объектом IEnumerable<T>, где универсальный параметр |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
Копирует объекты DataRow в указанный объект DataTable с заданным входным объектом IEnumerable<T>, где универсальный параметр |
Cast<TResult>(IEnumerable) |
Приводит элементы объекта IEnumerable к заданному типу.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Выполняет фильтрацию элементов объекта IEnumerable по заданному типу.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Позволяет осуществлять параллельный запрос.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Преобразовывает коллекцию IEnumerable в объект IQueryable.Converts an IEnumerable to an IQueryable. |
Ancestors<T>(IEnumerable<T>) |
Возвращает коллекцию элементов, содержащую предков каждого узла в исходной коллекции.Returns a collection of elements that contains the ancestors of every node in the source collection. |
Ancestors<T>(IEnumerable<T>, XName) |
Возвращает отфильтрованную коллекцию элементов, содержащую предков каждого узла в исходной коллекции.Returns a filtered collection of elements that contains the ancestors of every node in the source collection. В коллекцию включаются только элементы, соответствующие XName.Only elements that have a matching XName are included in the collection. |
DescendantNodes<T>(IEnumerable<T>) |
Возвращает коллекцию подчиненных узлов каждого документа и элемента в исходной коллекции.Returns a collection of the descendant nodes of every document and element in the source collection. |
Descendants<T>(IEnumerable<T>) |
Возвращает коллекцию элементов, содержащую подчиненные элементы каждого элемента и документа в исходной коллекции.Returns a collection of elements that contains the descendant elements of every element and document in the source collection. |
Descendants<T>(IEnumerable<T>, XName) |
Возвращает отфильтрованную коллекцию элементов, содержащую подчиненные элементы каждого элемента и документа в исходной коллекции.Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. В коллекцию включаются только элементы, соответствующие XName.Only elements that have a matching XName are included in the collection. |
Elements<T>(IEnumerable<T>) |
Возвращает коллекцию дочерних элементов каждого элемента и документа в исходной коллекции.Returns a collection of the child elements of every element and document in the source collection. |
Elements<T>(IEnumerable<T>, XName) |
Возвращает отфильтрованную коллекцию дочерних элементов каждого элемента и документа в исходной коллекции.Returns a filtered collection of the child elements of every element and document in the source collection. В коллекцию включаются только элементы, соответствующие XName.Only elements that have a matching XName are included in the collection. |
InDocumentOrder<T>(IEnumerable<T>) |
Возвращает коллекцию узлов, содержащую все узлы в исходной коллекции, отсортированные в порядке следования документов.Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. |
Nodes<T>(IEnumerable<T>) |
Возвращает коллекцию дочерних узлов каждого документа и элемента в исходной коллекции.Returns a collection of the child nodes of every document and element in the source collection. |
Remove<T>(IEnumerable<T>) |
Удаление каждого узла в исходной коллекции из родительского узла.Removes every node in the source collection from its parent node. |
Применяется к
Потокобезопасность
Данный тип потокобезопасен.This type is thread safe.