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]));
Пример #2
0
            public readonly TSource this[int index]
            {
                get
                {
                    if (index != 0)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(value);
                }
            }
Пример #3
0
            public readonly int this[int index]
            {
                get
                {
                    if (index < 0 || index >= Count)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(index + start);
                }
            }
Пример #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]));
                }
            }
Пример #5
0
            public                   TResult this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index < 0 || index >= count)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(selector.Invoke(start + index));
                }
            }
Пример #6
0
            public readonly TSource this[int index]
            {
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
                get
                {
                    if (index != 0)
                    {
                        Throw.IndexOutOfRangeException();
                    }

                    return(value);
                }
            }
Пример #7
0
 public TSource this[int index]
 => Throw.IndexOutOfRangeException <TSource>();