Show / Hide Table of Contents

Struct ReadOnlyListView<TInput, TOutput>

Represents lazily converted read-only list.

Implements
IReadOnlyList<TOutput>
IReadOnlyCollection<TOutput>
IEnumerable<TOutput>
IEnumerable
IEquatable<ReadOnlyListView<TInput, TOutput>>
Inherited Members
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: DotNext.Collections.Generic
Assembly: DotNext.dll
Syntax
public struct ReadOnlyListView<TInput, TOutput> : IReadOnlyList<TOutput>, IReadOnlyCollection<TOutput>, IEnumerable<TOutput>, IEnumerable, IEquatable<ReadOnlyListView<TInput, TOutput>>
Type Parameters
Name Description
TInput

Type of items in the source list.

TOutput

Type of items in the converted list.

Constructors

| Improve this Doc View Source

ReadOnlyListView(IReadOnlyList<TInput>, ValueFunc<TInput, TOutput>)

Initializes a new lazily converted view.

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

Read-only list to convert.

ValueFunc<TInput, TOutput> 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 TOutput this[int index] { get; }
Parameters
Type Name Description
Int32 index

Zero-based index of the item.

Property Value
Type Description
TOutput

Converted item at the specified position.

Methods

| Improve this Doc View Source

Equals(ReadOnlyListView<TInput, TOutput>)

Determines whether two converted lists are same.

Declaration
public bool Equals(ReadOnlyListView<TInput, TOutput> other)
Parameters
Type Name Description
ReadOnlyListView<TInput, TOutput> 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.

Overrides
ValueType.Equals(Object)
| Improve this Doc View Source

GetEnumerator()

Returns enumerator over converted items.

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

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.

Overrides
ValueType.GetHashCode()

Operators

| Improve this Doc View Source

Equality(ReadOnlyListView<TInput, TOutput>, ReadOnlyListView<TInput, TOutput>)

Determines whether two views are same.

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

The first list view to compare.

ReadOnlyListView<TInput, TOutput> 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<TInput, TOutput>, ReadOnlyListView<TInput, TOutput>)

Determines whether two views are not same.

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

The first list view to compare.

ReadOnlyListView<TInput, TOutput> 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.

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
IEnumerator

Implements

System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IEquatable<T>

Extension Methods

ValueTypeExtensions.IsOneOf<T>(T, IEnumerable<T>)
ValueTypeExtensions.IsOneOf<T>(T, T[])
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, ValueFunc<TInput, TOutput>)
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, Converter<TInput, TOutput>)
List.IndexerGetter<T>(IReadOnlyList<T>)
List.Convert<TInput, TOutput>(IReadOnlyList<TInput>, ValueFunc<TInput, TOutput>)
List.Convert<TInput, TOutput>(IReadOnlyList<TInput>, Converter<TInput, TOutput>)
Sequence.ToAsyncEnumerable<T>(IEnumerable<T>)
Sequence.GetAsyncEnumerator<T>(IEnumerable<T>, CancellationToken)
Sequence.ForEach<T>(IEnumerable<T>, Action<T>)
Sequence.ForEach<T>(IEnumerable<T>, ValueAction<T>)
Sequence.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
Sequence.ForEachAsync<T>(IEnumerable<T>, ValueFunc<T, CancellationToken, ValueTask>, CancellationToken)
Sequence.FirstOrEmpty<T>(IEnumerable<T>)
Sequence.FirstOrEmpty<T>(IEnumerable<T>, ValueFunc<T, Boolean>)
Sequence.FirstOrEmpty<T>(IEnumerable<T>, Predicate<T>)
Sequence.Skip<TEnumerator, T>(ref TEnumerator, Int32)
Sequence.ElementAt<T>(IEnumerable<T>, Int32, out T)
Sequence.ToString<T>(IEnumerable<T>, String, String)
Sequence.Prepend<T>(IEnumerable<T>, T[])
Sequence.Append<T>(IEnumerable<T>, T[])
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX