csharp
public record class ContentReplyWhat to send back, and the bytes to send.
No guide page documents this yet — the page shows what the code says about itself.
Fields and properties (6)
public ContentStatus StatusThe status.
public long OffsetWhere in the resource the body starts.
public long LengthHow many bytes are in the body.
public long TotalHow many bytes are in the whole resource.
public string ContentTypeWhat the body is.
public Stream? BodyThe bytes, already positioned at Offset. Null for a status with no body.
Methods (4)
public ContentReply(ContentStatus Status, long Offset, long Length, long Total, string ContentType)What to send back, and the bytes to send.
public string? ContentRange()The Content-Range header this reply needs, if it needs one.
public Task WriteBodyToAsync(Stream destination, CancellationToken cancellationToken = default(CancellationToken))Writes exactly the bytes this reply promised.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (4)
- ContentServerVixen.ContentServer
- ContentServerHostVixen.ContentServer
- ContentServerTestsVixen.ContentServer.Tests
- ServedDirectoryVixen.ContentServer.Tests