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 Quellteils.

targetPartUri
Uri

Der URI des Zielteils.

Gibt zurück

Uri

Der relative URI von sourcePartUri zu targetPartUri.

Ausnahmen

sourcePartUri oder targetPartUri ist null.

Entweder die sourcePartUri gültige Syntax oder targetPartUri keine gültige Uri Syntax.

Hinweise

In der folgenden Tabelle sind Beispielfälle für GetRelativeUri.

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