Struct BOBChunkContext
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
One chunk emitted by BOBChunkedUploader. The Data buffer is
owned by the uploader and only guaranteed valid for the duration of the
SendChunk callback's awaitable — do not retain it past the callback's return.
public readonly struct BOBChunkContext
Constructors
BOBChunkContext(string, string, long, int, int, long, ReadOnlyMemory<byte>)
One chunk emitted by BOBChunkedUploader. The Data buffer is
owned by the uploader and only guaranteed valid for the duration of the
SendChunk callback's awaitable — do not retain it past the callback's return.
public BOBChunkContext(string FileName, string ContentType, long FileSize, int Index, int TotalChunks, long Offset, ReadOnlyMemory<byte> Data)
Parameters
FileNamestringThe originating file's display name.
ContentTypestringThe originating file's MIME type.
FileSizelongTotal size of the originating file in bytes.
IndexintZero-based chunk index.
TotalChunksintTotal chunks the uploader will emit for this file.
OffsetlongByte offset within the file where Data starts.
DataReadOnlyMemory<byte>The chunk payload. Length is always
<= ChunkSize; the final chunk is short wheneverFileSizeis not a multiple ofChunkSize.
Properties
ContentType
The originating file's MIME type.
public string ContentType { get; init; }
Property Value
- string
Data
The chunk payload. Length is always <= ChunkSize; the final
chunk is short whenever FileSize is not a multiple of ChunkSize.
public ReadOnlyMemory<byte> Data { get; init; }
Property Value
- ReadOnlyMemory<byte>
FileName
The originating file's display name.
public string FileName { get; init; }
Property Value
- string
FileSize
Total size of the originating file in bytes.
public long FileSize { get; init; }
Property Value
- long
Index
Zero-based chunk index.
public int Index { get; init; }
Property Value
- int
Offset
Byte offset within the file where Data starts.
public long Offset { get; init; }
Property Value
- long
TotalChunks
Total chunks the uploader will emit for this file.
public int TotalChunks { get; init; }
Property Value
- int