ProgressStreamContent Class

A custom StreamContent implementation to track and report progress during upload.

Definition

Namespace: GenerativeAI.Core
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class ProgressStreamContent : HttpContent
Inheritance
Object    HttpContent    ProgressStreamContent

Constructors

ProgressStreamContentInitializes a new instance of the ProgressStreamContent class

Properties

HeadersGets the HTTP content headers as defined in RFC 2616.
(Inherited from HttpContent)

Methods

CopyToSerializes the HTTP content into a stream of bytes and copies it to stream.
(Inherited from HttpContent)
CopyToAsync(Stream)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.
(Inherited from HttpContent)
CopyToAsync(Stream, TransportContext)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.
(Inherited from HttpContent)
CopyToAsync(Stream, CancellationToken)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.
(Inherited from HttpContent)
CopyToAsync(Stream, TransportContext, CancellationToken)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.
(Inherited from HttpContent)
CreateContentReadStreamSerializes the HTTP content to a memory stream.
(Inherited from HttpContent)
CreateContentReadStreamAsyncSerialize the HTTP content to a memory stream as an asynchronous operation.
(Inherited from HttpContent)
CreateContentReadStreamAsync(CancellationToken)Serializes the HTTP content to a memory stream as an asynchronous operation.
(Inherited from HttpContent)
DisposeReleases the unmanaged resources and disposes of the managed resources used by the HttpContent.
(Inherited from HttpContent)
Dispose(Boolean)Releases the unmanaged resources used by the ProgressStreamContent and optionally releases the managed resources
(Overrides HttpContentDispose(Boolean))
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
LoadIntoBufferAsyncSerialize the HTTP content to a memory buffer as an asynchronous operation.
(Inherited from HttpContent)
LoadIntoBufferAsync(Int64)Serialize the HTTP content to a memory buffer as an asynchronous operation.
(Inherited from HttpContent)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ReadAsByteArrayAsyncSerialize the HTTP content to a byte array as an asynchronous operation.
(Inherited from HttpContent)
ReadAsByteArrayAsync(CancellationToken)Serialize the HTTP content to a byte array as an asynchronous operation.
(Inherited from HttpContent)
ReadAsStreamSerializes the HTTP content and returns a stream that represents the content.
(Inherited from HttpContent)
ReadAsStream(CancellationToken)Serializes the HTTP content and returns a stream that represents the content.
(Inherited from HttpContent)
ReadAsStreamAsyncSerialize the HTTP content and return a stream that represents the content as an asynchronous operation.
(Inherited from HttpContent)
ReadAsStreamAsync(CancellationToken)Serialize the HTTP content and return a stream that represents the content as an asynchronous operation.
(Inherited from HttpContent)
ReadAsStringAsyncSerialize the HTTP content to a string as an asynchronous operation.
(Inherited from HttpContent)
ReadAsStringAsync(CancellationToken)Serialize the HTTP content to a string as an asynchronous operation.
(Inherited from HttpContent)
SerializeToStreamWhen overridden in a derived class, serializes the HTTP content to a stream. Otherwise, throws a NotSupportedException.
(Inherited from HttpContent)
SerializeToStreamAsync(Stream, TransportContext)
(Overrides HttpContentSerializeToStreamAsync(Stream, TransportContext))
SerializeToStreamAsync(Stream, TransportContext, CancellationToken)Serialize the HTTP content to a stream as an asynchronous operation.
(Inherited from HttpContent)
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryComputeLength
(Overrides HttpContentTryComputeLength(Int64))

See Also