다음을 통해 공유


OpenXmlPackage.CreateMediaDataPart Method

Definition

Overloads

CreateMediaDataPart(MediaDataPartType)

Creates a new MediaDataPart part in the document package.

CreateMediaDataPart(String)

Creates a new MediaDataPart part in the document package.

CreateMediaDataPart(String, String)

Creates a new MediaDataPart part in the document package.

CreateMediaDataPart(MediaDataPartType)

Creates a new MediaDataPart part in the document package.

public DocumentFormat.OpenXml.Packaging.MediaDataPart CreateMediaDataPart (DocumentFormat.OpenXml.Packaging.MediaDataPartType mediaDataPartType);
member this.CreateMediaDataPart : DocumentFormat.OpenXml.Packaging.MediaDataPartType -> DocumentFormat.OpenXml.Packaging.MediaDataPart
Public Function CreateMediaDataPart (mediaDataPartType As MediaDataPartType) As MediaDataPart

Parameters

mediaDataPartType
MediaDataPartType

The content type of the new MediaDataPart part.

Returns

The added MediaDataPart part.

Applies to

CreateMediaDataPart(String)

Creates a new MediaDataPart part in the document package.

public DocumentFormat.OpenXml.Packaging.MediaDataPart CreateMediaDataPart (string contentType);
member this.CreateMediaDataPart : string -> DocumentFormat.OpenXml.Packaging.MediaDataPart
Public Function CreateMediaDataPart (contentType As String) As MediaDataPart

Parameters

contentType
String

The content type of the new MediaDataPart part.

Returns

The added MediaDataPart part.

Exceptions

Thrown when contentType is a null reference.

Applies to

CreateMediaDataPart(String, String)

Creates a new MediaDataPart part in the document package.

public DocumentFormat.OpenXml.Packaging.MediaDataPart CreateMediaDataPart (string contentType, string extension);
member this.CreateMediaDataPart : string * string -> DocumentFormat.OpenXml.Packaging.MediaDataPart
Public Function CreateMediaDataPart (contentType As String, extension As String) As MediaDataPart

Parameters

contentType
String

The content type of the new MediaDataPart part.

extension
String

The part name extension (.dat, etc.) of the new MediaDataPart part.

Returns

The added MediaDataPart part.

Exceptions

Thrown when extension is a null reference.

Applies to