FileBinaryContent Class

Definition

Represents file content that can be sent to a cloud service as part of a PipelineRequest.

public sealed class FileBinaryContent : System.ClientModel.BinaryContent
type FileBinaryContent = class
    inherit BinaryContent
Public NotInheritable Class FileBinaryContent
Inherits BinaryContent
Inheritance
FileBinaryContent

Constructors

Name Description
FileBinaryContent(BinaryData, String)

Initializes a new instance of FileBinaryContent that contains the bytes held in the provided BinaryData instance.

FileBinaryContent(Stream, String)

Initializes a new instance of FileBinaryContent that contains the bytes held in the provided Stream instance.

FileBinaryContent(String, String)

Initializes a new instance of FileBinaryContent that contains the bytes held in the file at the provided path.

Properties

Name Description
Filename

Gets or sets the file name associated with this file content.

MediaType

Gets the media type of the content.

(Inherited from BinaryContent)

Methods

Name Description
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

TryComputeLength(Int64)

Attempts to compute the length of the underlying body content, if available.

WriteTo(Stream, CancellationToken)

Writes contents of this BinaryContent instance to the provided Stream.

WriteToAsync(Stream, CancellationToken)

Writes contents of this BinaryContent instance to the provided Stream.

Applies to