Interface IMemoryGroup
Represents discontiguous group of multiple uniformly-sized memory segments. The last segment can be smaller than the preceding ones.
Namespace: SixLabors .ImageSharp .Memory
Assembly: SixLabors.ImageSharp.dll
Syntax
public interface IMemoryGroup<T> : IReadOnlyList<Memory<T>>, IReadOnlyCollection<Memory<T>>, IEnumerable<Memory<T>>, IEnumerable where T : struct
Type Parameters
Name | Description |
---|---|
T | The element type. |
Properties
| Edit this page View SourceBufferLength
Gets the number of elements per contiguous sub-buffer preceding the last buffer. The last buffer is allowed to be smaller.
Declaration
int BufferLength { get; }
Property Value
Type | Description |
---|---|
int |
IsValid
Gets a value indicating whether the group has been invalidated.
Declaration
bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Invalidation usually occurs when an image processor capable to alter the image dimensions replaces the image buffers internally.
TotalLength
Gets the aggregate number of elements in the group.
Declaration
long TotalLength { get; }
Property Value
Type | Description |
---|---|
long |
Methods
| Edit this page View SourceGetEnumerator()
Returns a value-type implementing an allocation-free enumerator of the memory groups in the current
instance. The return type shouldn't be used directly: just use a foreach block on
the IMemory
Declaration
MemoryGroupEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
MemoryGroupEnum |
A new Six |