다음을 통해 공유


IRelationshipCollection.Create(Uri, TargetMode, String, String) Method

Definition

Creates a relationship to a part with a given URI, target mode, relationship type, and (optional) identifier.

public DocumentFormat.OpenXml.Packaging.IPackageRelationship Create (Uri targetUri, System.IO.Packaging.TargetMode targetMode, string relationshipType, string? id = default);
abstract member Create : Uri * System.IO.Packaging.TargetMode * string * string -> DocumentFormat.OpenXml.Packaging.IPackageRelationship
Public Function Create (targetUri As Uri, targetMode As TargetMode, relationshipType As String, Optional id As String = Nothing) As IPackageRelationship

Parameters

targetUri
Uri

The URI of the target part

targetMode
TargetMode

Indicates if the target part is internal or external to the package.

relationshipType
String

A URI that uniquely defines the role of the relationship

id
String

A unique XML identifier

Returns

The relationship to the specified part.

Applies to