ReadOnlyCollectionBuilder<T> ReadOnlyCollectionBuilder<T> ReadOnlyCollectionBuilder<T> ReadOnlyCollectionBuilder<T> Class

Definition

The builder for read only collection.

generic <typename T>
public ref class ReadOnlyCollectionBuilder sealed : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList
[System.Serializable]
public sealed class ReadOnlyCollectionBuilder<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList
type ReadOnlyCollectionBuilder<'T> = class
    interface IList<'T>
    interface IList
    interface ICollection<'T>
    interface seq<'T>
    interface IEnumerable
    interface ICollection
Public NotInheritable Class ReadOnlyCollectionBuilder(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T)

Type Parameters

T

The type of the collection element.

Inheritance
ReadOnlyCollectionBuilder<T>ReadOnlyCollectionBuilder<T>ReadOnlyCollectionBuilder<T>ReadOnlyCollectionBuilder<T>
Attributes
Implements

Constructors

ReadOnlyCollectionBuilder<T>() ReadOnlyCollectionBuilder<T>() ReadOnlyCollectionBuilder<T>() ReadOnlyCollectionBuilder<T>()

Constructs a ReadOnlyCollectionBuilder<T>.

ReadOnlyCollectionBuilder<T>(IEnumerable<T>) ReadOnlyCollectionBuilder<T>(IEnumerable<T>) ReadOnlyCollectionBuilder<T>(IEnumerable<T>) ReadOnlyCollectionBuilder<T>(IEnumerable<T>)

Constructs a ReadOnlyCollectionBuilder<T>, copying the contents of the given collection.

ReadOnlyCollectionBuilder<T>(Int32) ReadOnlyCollectionBuilder<T>(Int32) ReadOnlyCollectionBuilder<T>(Int32) ReadOnlyCollectionBuilder<T>(Int32)

Constructs a ReadOnlyCollectionBuilder<T> with a given initial capacity. The contents are empty but builder will have reserved room for the given number of elements before any reallocations are required.

Properties

Capacity Capacity Capacity Capacity

Gets or sets the capacity of this ReadOnlyCollectionBuilder<T>.

Count Count Count Count

Gets the number of elements in the ReadOnlyCollectionBuilder<T>.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets or sets the element at the specified index.

Methods

Add(T) Add(T) Add(T) Add(T)

Adds an item to the ReadOnlyCollectionBuilder<T>.

Clear() Clear() Clear() Clear()

Removes all items from the ReadOnlyCollectionBuilder<T>.

Contains(T) Contains(T) Contains(T) Contains(T)

Determines whether the ReadOnlyCollectionBuilder<T> contains a specific value

CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

Copies the elements of the ReadOnlyCollectionBuilder<T> to an Array, starting at particular Array index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)

Returns the index of the first occurrence of a given value in the builder.

Insert(Int32, T) Insert(Int32, T) Insert(Int32, T) Insert(Int32, T)

Inserts an item to the ReadOnlyCollectionBuilder<T> at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(T) Remove(T) Remove(T) Remove(T)

Removes the first occurrence of a specific object from the ReadOnlyCollectionBuilder<T>.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Removes the ReadOnlyCollectionBuilder<T> item at the specified index.

Reverse() Reverse() Reverse() Reverse()

Reverses the order of the elements in the entire ReadOnlyCollectionBuilder<T>.

Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32)

Reverses the order of the elements in the specified range.

ToArray() ToArray() ToArray() ToArray()

Copies the elements of the ReadOnlyCollectionBuilder<T> to a new array.

ToReadOnlyCollection() ToReadOnlyCollection() ToReadOnlyCollection() ToReadOnlyCollection()

Creates a ReadOnlyCollection<T> containing all of the elements of the ReadOnlyCollectionBuilder<T>, avoiding copying the elements to the new array if possible. Resets the ReadOnlyCollectionBuilder<T> after the ReadOnlyCollection<T> has been created.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

Copies the elements of the ICollection<T> to an array, starting at the specified array index.

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the collection.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

Adds an item to the IList.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

Determines whether the IList contains a specific value.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

Determines the index of a specific item in the IList.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

Inserts an item to the IList at the specified index.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

Gets a value indicating whether the IList has a fixed size.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

Gets a value indicating whether the IList is read-only.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

Gets or sets the element at the specified index.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

Removes the first occurrence of a specific object from the IList.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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. Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to