Прочетете на английски Редактиране

Споделяне чрез


ReadOnlySequence<T>.Slice Method

Definition

Overloads

Slice(Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified index and continuing to the end of the read-only sequence.

Slice(SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified sequence position and continuing to the end of the read-only sequence.

Slice(Int32, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int32, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(Int64, Int64)

Forms a slice out of the given ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int64, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(SequencePosition, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(Int64)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified index and continuing to the end of the read-only sequence.

C#
public System.Buffers.ReadOnlySequence<T> Slice(long start);

Parameters

start
Int64

The start index at which to begin this slice.

Returns

A slice starting at index start and continuing to the end of the current read-only sequence.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(SequencePosition)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified sequence position and continuing to the end of the read-only sequence.

C#
public System.Buffers.ReadOnlySequence<T> Slice(SequencePosition start);

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

Returns

A slice starting at sequence position start and continuing to the end of the current read-only sequence.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(Int32, Int32)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

C#
public System.Buffers.ReadOnlySequence<T> Slice(int start, int length);

Parameters

start
Int32

The index at which to begin this slice.

length
Int32

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at index start.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(Int32, SequencePosition)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

C#
public System.Buffers.ReadOnlySequence<T> Slice(int start, SequencePosition end);

Parameters

start
Int32

The index at which to begin this slice.

end
SequencePosition

The end (exclusive) SequencePosition of the slice.

Returns

A slice that consists of items from the start index to, but not including, the end sequence position in the current read-only sequence.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(Int64, Int64)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the given ReadOnlySequence<T>, beginning at start, with length items.

C#
public System.Buffers.ReadOnlySequence<T> Slice(long start, long length);

Parameters

start
Int64

The index at which to begin this slice.

length
Int64

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at index start.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(Int64, SequencePosition)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

C#
public System.Buffers.ReadOnlySequence<T> Slice(long start, SequencePosition end);

Parameters

start
Int64

The index at which to begin this slice.

end
SequencePosition

The end (exclusive) of the slice.

Returns

A slice that consists of items from the start index to, but not including, the end sequence position in the current read-only sequence.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(SequencePosition, Int32)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

C#
public System.Buffers.ReadOnlySequence<T> Slice(SequencePosition start, int length);

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

length
Int32

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at sequence position start.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(SequencePosition, Int64)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

C#
public System.Buffers.ReadOnlySequence<T> Slice(SequencePosition start, long length);

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

length
Int64

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at sequence position start.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

Slice(SequencePosition, SequencePosition)

Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs
Source:
ReadOnlySequence.cs

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

C#
public System.Buffers.ReadOnlySequence<T> Slice(SequencePosition start, SequencePosition end);

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

end
SequencePosition

The ending (exclusive) SequencePosition of the slice.

Returns

A slice that consists of items from the start sequence position to, but not including, the end sequence position in the current read-only sequence.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1