你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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