Share via


PackUriHelper.GetRelativeUri(Uri, Uri) Methode

Definition

Gibt den relativen URI zwischen zwei angegebenen PackagePart-URIs zurück.

public:
 static Uri ^ GetRelativeUri(Uri ^ sourcePartUri, Uri ^ targetPartUri);
public static Uri GetRelativeUri (Uri sourcePartUri, Uri targetPartUri);
static member GetRelativeUri : Uri * Uri -> Uri
Public Shared Function GetRelativeUri (sourcePartUri As Uri, targetPartUri As Uri) As Uri

Parameter

sourcePartUri
Uri

Der URI des Quellparts.

targetPartUri
Uri

Der URI des Zielparts.

Gibt zurück

Uri

Die relative URI von sourcePartUri bis targetPartUri.

Ausnahmen

sourcePartUri oder targetPartUri ist null.

Entweder der sourcePartUri oder der targetPartUri besitzt keine gültige Uri-Syntax.

Hinweise

In der folgenden Tabelle werden Beispielfälle für GetRelativeUriveranschaulicht.

sourcePartUri targetPartUri Zurückgegebener relativer URI
/mydoc/markup/page.xml /mydoc/markup/picture.jpg picture.jpg
/mydoc/markup/page.xml /mydoc/picture.jpg .. /picture.jpg
/mydoc/markup/page.xml /mydoc/images/picture.jpg .. /images/picture.jpg

Gilt für:

Weitere Informationen