Show / Hide Table of Contents

Struct ReadOnlyListView<I, O>

Represents lazily converted read-only list.

Implements
IReadOnlyList<O>
IEquatable<ReadOnlyListView<I, O>>
Namespace: DotNext.Collections.Generic
Assembly: DotNext.dll
Syntax
public struct ReadOnlyListView<I, O> : IReadOnlyList<O>, IEquatable<ReadOnlyListView<I, O>>
Type Parameters
Name Description
I

Type of items in the source list.

O

Type of items in the converted list.

Constructors

| Improve this Doc View Source

ReadOnlyListView(IReadOnlyList<I>, ValueFunc<I, O>)

Initializes a new lazily converted view.

Declaration
public ReadOnlyListView(IReadOnlyList<I> list, in ValueFunc<I, O> mapper)
Parameters
Type Name Description
IReadOnlyList<I> list

Read-only list to convert.

ValueFunc<I, O> mapper

List items converter.

Properties

| Improve this Doc View Source

Count

Count of items in the list.

Declaration
public int Count { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Item[Int32]

Gets item at the specified position.

Declaration
public O this[int index] { get; }
Parameters
Type Name Description
Int32 index

Zero-based index of the item.

Property Value
Type Description
O

Converted item at the specified position.

Methods

| Improve this Doc View Source

Equals(ReadOnlyListView<I, O>)

Determines whether two converted lists are same.

Declaration
public bool Equals(ReadOnlyListView<I, O> other)
Parameters
Type Name Description
ReadOnlyListView<I, O> other

Other list to compare.

Returns
Type Description
Boolean

true if this view wraps the same source list and contains the same converter as other view; otherwise, false.

| Improve this Doc View Source

Equals(Object)

Determines whether two converted lists are same.

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
Object other

Other list to compare.

Returns
Type Description
Boolean

true if this collection wraps the same source collection and contains the same converter as other collection; otherwise, false.

| Improve this Doc View Source

GetEnumerator()

Returns enumerator over converted items.

Declaration
public IEnumerator<O> GetEnumerator()
Returns
Type Description
IEnumerator<O>

The enumerator over converted items.

| Improve this Doc View Source

GetHashCode()

Returns hash code for the this list.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

The hash code of this list.

Operators

| Improve this Doc View Source

Equality(ReadOnlyListView<I, O>, ReadOnlyListView<I, O>)

Determines whether two views are same.

Declaration
public static bool operator ==(ReadOnlyListView<I, O> first, ReadOnlyListView<I, O> second)
Parameters
Type Name Description
ReadOnlyListView<I, O> first

The first list view to compare.

ReadOnlyListView<I, O> second

The second list view to compare.

Returns
Type Description
Boolean

true if the first view wraps the same source collection and contains the same converter as the second view; otherwise, false.

| Improve this Doc View Source

Inequality(ReadOnlyListView<I, O>, ReadOnlyListView<I, O>)

Determines whether two views are not same.

Declaration
public static bool operator !=(ReadOnlyListView<I, O> first, ReadOnlyListView<I, O> second)
Parameters
Type Name Description
ReadOnlyListView<I, O> first

The first list view to compare.

ReadOnlyListView<I, O> second

The second list view to compare.

Returns
Type Description
Boolean

true if the first view wraps the different source collection and contains the different converter as the second view; otherwise, false.

Implements

IReadOnlyList<>
IEquatable<>

Extension Methods

ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX