[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.ReadOnlyListWrapper-2

Class ReadOnlyListWrapper<TItem, TWrapperItem>

Namespace
GrapeCity.Documents.Common
Assembly
GcDocs.Imaging.dll

The read-only list wrapper around the System.Collections.Generic.IList<T>.

public class ReadOnlyListWrapper<TItem, TWrapperItem> : IReadOnlyList<TWrapperItem>, IReadOnlyCollection<TWrapperItem>, IEnumerable<TWrapperItem>, IEnumerable where TItem : class where TWrapperItem : class, TItem

Type Parameters

TItem

The item type of the underlying list.

TWrapperItem

The item type.

Inheritance
object
ReadOnlyListWrapper<TItem, TWrapperItem>
Implements
System.Collections.Generic.IReadOnlyList<T><TWrapperItem>
System.Collections.Generic.IReadOnlyCollection<T><TWrapperItem>
System.Collections.Generic.IEnumerable<T><TWrapperItem>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Count

Gets the number of elements contained in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets or sets the element at the specified index.

public TWrapperItem this[int index] { get; }

Parameters

index int

The zero-based index of the element to get or set.

Property Value

TWrapperItem

The element at the specified index.

Methods

Contains(TWrapperItem)

Determines whether an element is in the collection.

public bool Contains(TWrapperItem item)

Parameters

item TWrapperItem

The object to locate in the collection.

Returns

bool

true if item is found in the collection; otherwise, false.

CopyTo(TItem[], int)

Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.

public void CopyTo(TItem[] array, int arrayIndex)

Parameters

array TItem[]

The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

IndexOf(TWrapperItem)

Searches for the specified object and returns the zero-based index of the first occurrence within the entire collection.

public int IndexOf(TWrapperItem item)

Parameters

item TWrapperItem

The object to locate in the collection.

Returns

int

The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.