Vixen
02b45cc4
csharp
public record class ContentReply

What 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 Status

    The status.

  • public long Offset

    Where in the resource the body starts.

  • public long Length

    How many bytes are in the body.

  • public long Total

    How many bytes are in the whole resource.

  • public string ContentType

    What the body is.

  • public Stream? Body

    The 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