public                                   TResult this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index < 0 || index >= source.Count)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(selector.Invoke(source.Array ![index + source.Offset]));
Ejemplo n.º 2
0
            public readonly TSource this[int index]
            {
                get
                {
                    if (index != 0)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(value);
                }
            }
Ejemplo n.º 3
0
            public readonly int this[int index]
            {
                get
                {
                    if (index < 0 || index >= Count)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(index + start);
                }
            }
Ejemplo n.º 4
0
            public                                     TResult this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index < 0 || index >= source.Length)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(selector.Invoke(source.Span[index]));
                }
            }
Ejemplo n.º 5
0
            public                   TResult this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index < 0 || index >= count)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(selector.Invoke(start + index));
                }
            }
Ejemplo n.º 6
0
            public readonly TSource this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index != 0)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(value);
                }
            }
Ejemplo n.º 7
0
 public TSource this[int index]
 => Throw.IndexOutOfRangeException <TSource>();