PackUriHelper.GetPartUri(Uri) 메서드

정의

지정된 pack URI 내에서 PackagePart의 URI를 반환합니다.

public:
 static Uri ^ GetPartUri(Uri ^ packUri);
public static Uri GetPartUri (Uri packUri);
public static Uri? GetPartUri (Uri packUri);
static member GetPartUri : Uri -> Uri
Public Shared Function GetPartUri (packUri As Uri) As Uri

매개 변수

packUri
Uri

PackagePart URI를 반환할 Pack URI입니다.

반환

Uri

지정된 packUri에 있는 PackagePart의 URI 또는 packUri에서 PackagePart가 아니라 패키지를 가리키는 경우 null입니다.

예외

packUrinull인 경우

packUri가 절대 Uri가 아닌 경우

또는

packUri에 “pack://” 체계가 없는 경우

또는

packUri에서 추출된 partUri가 유효한 partUri 구문을 준수하지 않는 경우

설명

반환된 PackagePart URI는 패키지 루트를 기준으로 하며 항상 "/"로 시작하고 Open Packaging Conventions 사양에 정의된 구문을 준수하는 절대 경로입니다.

다음 표에서는 에 대한 GetPartUri샘플 사례를 보여 줍니다.

packUri 반환된 파트 URI
pack://http:,,www.proseware.com,mypackage.xyz/a/mydoc.xaml /a/mydoc.xaml
pack://http:,,www.proseware.com,packages.aspx%3fmypackage/a/bar.xaml /a/bar.xaml
pack://http:,,www.proseware.com,mypackage.pkg null
pack://ftp:,,ftp.proseware.com,packages,mypackage1.abc/a/picture.jpg /a/picture.jpg
pack://file:,,,d:,packages,mypackage2.pkg/a/bar.xaml /a/bar.xaml

적용 대상

추가 정보