C# 클래스 System.Runtime.CompilerServices.ReadOnlyCollectionBuilder

Builder for read only collections.
상속: IList, IList
파일 보기 프로젝트 열기: mikedn/runtime 1 사용 예제들

Private Properties

프로퍼티 타입 설명
EnsureCapacity void
ICollection void
IEnumerable IEnumerator
IList bool
IList int
IList void
IList void
IsCompatibleObject bool
ValidateNullValue void
this object?IList.System.Collections

공개 메소드들

메소드 설명
Add ( item ) : void

Adds an item to the ReadOnlyCollectionBuilder{T}.

Clear ( ) : void

Removes all items from the ReadOnlyCollectionBuilder{T}.

Contains ( item ) : bool

Determines whether the ReadOnlyCollectionBuilder{T} contains a specific value

CopyTo ( Array array, int arrayIndex ) : void

Copies the elements of the ReadOnlyCollectionBuilder{T} to an Array, starting at particular Array index.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the collection.

IndexOf ( item ) : int

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

Insert ( int index, item ) : void

Inserts an item to the ReadOnlyCollectionBuilder{T} at the specified index.

ReadOnlyCollectionBuilder ( ) : System.Collections

Constructs a ReadOnlyCollectionBuilder{T}.

ReadOnlyCollectionBuilder ( IEnumerable collection ) : System.Collections

Constructs a ReadOnlyCollectionBuilder{T}, copying contents of the given collection.

ReadOnlyCollectionBuilder ( int capacity ) : System.Collections

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.

Remove ( item ) : bool

Removes the first occurrence of a specific object from the ReadOnlyCollectionBuilder{T}.

RemoveAt ( int index ) : void

Removes the ReadOnlyCollectionBuilder{T} item at the specified index.

Reverse ( ) : void

Reverses the order of the elements in the entire ReadOnlyCollectionBuilder{T}.

Reverse ( int index, int count ) : void

Reverses the order of the elements in the specified range.

ToArray ( ) : T[]

Copies the elements of the ReadOnlyCollectionBuilder{T} to a new array.

ToReadOnlyCollection ( ) : ReadOnlyCollection

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.

this ( int index ) : T

Gets or sets the element at the specified index.

비공개 메소드들

메소드 설명
EnsureCapacity ( int min ) : void
ICollection ( Array array, int index ) : void
IEnumerable ( ) : IEnumerator
IList ( object? value ) : bool
IList ( object? value ) : int
IList ( int index, object? value ) : void
IList ( object? value ) : void
IsCompatibleObject ( object? value ) : bool
ValidateNullValue ( object? value, string argument ) : void
this ( int index ) : object?IList.System.Collections

메소드 상세

Add() 공개 메소드

Adds an item to the ReadOnlyCollectionBuilder{T}.
public Add ( item ) : void
item The object to add to the .
리턴 void

Clear() 공개 메소드

Removes all items from the ReadOnlyCollectionBuilder{T}.
public Clear ( ) : void
리턴 void

Contains() 공개 메소드

Determines whether the ReadOnlyCollectionBuilder{T} contains a specific value
public Contains ( item ) : bool
item the object to locate in the .
리턴 bool

CopyTo() 공개 메소드

Copies the elements of the ReadOnlyCollectionBuilder{T} to an Array, starting at particular Array index.
public CopyTo ( Array array, int arrayIndex ) : void
array Array The one-dimensional that is the destination of the elements copied from .
arrayIndex int The zero-based index in array at which copying begins.
리턴 void

GetEnumerator() 공개 메소드

Returns an enumerator that iterates through the collection.
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

IndexOf() 공개 메소드

Returns the index of the first occurrence of a given value in the builder.
public IndexOf ( item ) : int
item An item to search for.
리턴 int

Insert() 공개 메소드

Inserts an item to the ReadOnlyCollectionBuilder{T} at the specified index.
public Insert ( int index, item ) : void
index int The zero-based index at which item should be inserted.
item The object to insert into the .
리턴 void

ReadOnlyCollectionBuilder() 공개 메소드

Constructs a ReadOnlyCollectionBuilder{T}.
public ReadOnlyCollectionBuilder ( ) : System.Collections
리턴 System.Collections

ReadOnlyCollectionBuilder() 공개 메소드

Constructs a ReadOnlyCollectionBuilder{T}, copying contents of the given collection.
public ReadOnlyCollectionBuilder ( IEnumerable collection ) : System.Collections
collection IEnumerable The collection whose elements to copy to the builder.
리턴 System.Collections

ReadOnlyCollectionBuilder() 공개 메소드

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.
public ReadOnlyCollectionBuilder ( int capacity ) : System.Collections
capacity int Initial capacity of the builder.
리턴 System.Collections

Remove() 공개 메소드

Removes the first occurrence of a specific object from the ReadOnlyCollectionBuilder{T}.
public Remove ( item ) : bool
item The object to remove from the .
리턴 bool

RemoveAt() 공개 메소드

Removes the ReadOnlyCollectionBuilder{T} item at the specified index.
public RemoveAt ( int index ) : void
index int The zero-based index of the item to remove.
리턴 void

Reverse() 공개 메소드

Reverses the order of the elements in the entire ReadOnlyCollectionBuilder{T}.
public Reverse ( ) : void
리턴 void

Reverse() 공개 메소드

Reverses the order of the elements in the specified range.
public Reverse ( int index, int count ) : void
index int The zero-based starting index of the range to reverse.
count int The number of elements in the range to reverse.
리턴 void

ToArray() 공개 메소드

Copies the elements of the ReadOnlyCollectionBuilder{T} to a new array.
public ToArray ( ) : T[]
리턴 T[]

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.
public ToReadOnlyCollection ( ) : ReadOnlyCollection
리턴 ReadOnlyCollection

this() 공개 메소드

Gets or sets the element at the specified index.
public this ( int index ) : T
index int The zero-based index of the element to get or set.
리턴 T