Sisk

Class

FileContent

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

Provides HTTP content based on a file.

C#
public sealed class FileContent : HttpContent, IDisposable

Inheritance #

object ← HttpContent ← FileContent

Implements #

IDisposable

Inherited Members #

HttpContent.ReadAsStringAsync(), HttpContent.ReadAsStringAsync(CancellationToken), HttpContent.ReadAsByteArrayAsync(), HttpContent.ReadAsByteArrayAsync(CancellationToken), HttpContent.ReadAsStream(), HttpContent.ReadAsStream(CancellationToken), HttpContent.ReadAsStreamAsync(), HttpContent.ReadAsStreamAsync(CancellationToken), HttpContent.CopyTo(Stream, TransportContext?, CancellationToken), HttpContent.CopyToAsync(Stream), HttpContent.CopyToAsync(Stream, CancellationToken), HttpContent.CopyToAsync(Stream, TransportContext?), HttpContent.CopyToAsync(Stream, TransportContext?, CancellationToken), HttpContent.LoadIntoBufferAsync(), HttpContent.LoadIntoBufferAsync(long), HttpContent.LoadIntoBufferAsync(CancellationToken), HttpContent.LoadIntoBufferAsync(long, CancellationToken), HttpContent.Dispose(), HttpContent.Headers, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
FileContent(FileInfo)Initializes a new instance of the FileContent class with the specified file.
FileContent(string)Initializes a new instance of the FileContent class with the specified file path.

Properties #

NameDescription
FileGets the file information for the content.

Methods #

NameDescription
CreateContentReadStream(CancellationToken)
CreateContentReadStreamAsync()
CreateContentReadStreamAsync(CancellationToken)
SerializeToStream(Stream, TransportContext?, CancellationToken)
SerializeToStreamAsync(Stream, TransportContext?, CancellationToken)
SerializeToStreamAsync(Stream, TransportContext?)
TryComputeLength(out long)

Type to search the documentation and the API reference.