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>();