OpenXmlSupportedRelationshipExtensions.AddImagePart 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddImagePart<T>(T, PartTypeInfo, String) |
将 ImagePart“/> 添加为与父部件的关系 |
AddImagePart<T>(T, String, String) |
ImagePart将 作为关系添加到父部件 |
AddImagePart<T>(T, PartTypeInfo, String)
将 ImagePart“/> 添加为与父部件的关系
public static DocumentFormat.OpenXml.Packaging.ImagePart AddImagePart<T> (this T parent, DocumentFormat.OpenXml.Packaging.PartTypeInfo partType, string? id = default) where T : DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer, DocumentFormat.OpenXml.Packaging.ISupportedRelationship<DocumentFormat.OpenXml.Packaging.ImagePart>;
static member AddImagePart : 'T * DocumentFormat.OpenXml.Packaging.PartTypeInfo * string -> DocumentFormat.OpenXml.Packaging.ImagePart (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer and 'T :> DocumentFormat.OpenXml.Packaging.ISupportedRelationship<DocumentFormat.OpenXml.Packaging.ImagePart>)
<Extension()>
Public Function AddImagePart(Of T As {OpenXmlPartContainer, ISupportedRelationship(Of ImagePart)}) (parent As T, partType As PartTypeInfo, Optional id As String = Nothing) As ImagePart
类型参数
- T
参数
- parent
- T
请求添加的父部件。
- partType
- PartTypeInfo
添加的可扩展部件的部件类型信息。
- id
- String
关系 ID。可选,默认为 null。
返回
适用于
AddImagePart<T>(T, String, String)
ImagePart将 作为关系添加到父部件
public static DocumentFormat.OpenXml.Packaging.ImagePart AddImagePart<T> (this T parent, string contentType, string? id = default) where T : DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer, DocumentFormat.OpenXml.Packaging.ISupportedRelationship<DocumentFormat.OpenXml.Packaging.ImagePart>;
static member AddImagePart : 'T * string * string -> DocumentFormat.OpenXml.Packaging.ImagePart (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer and 'T :> DocumentFormat.OpenXml.Packaging.ISupportedRelationship<DocumentFormat.OpenXml.Packaging.ImagePart>)
<Extension()>
Public Function AddImagePart(Of T As {OpenXmlPartContainer, ISupportedRelationship(Of ImagePart)}) (parent As T, contentType As String, Optional id As String = Nothing) As ImagePart
类型参数
- T
参数
- parent
- T
请求添加的父部件。
- contentType
- String
添加的可扩展部件的内容类型信息。
- id
- String
关系 ID。可选,默认为 null。