다음을 통해 공유


DataPackageView.GetUriAsync 메서드

정의

참고

GetUriAsync는 Windows 8.1 후 릴리스에 대해 변경되거나 사용할 수 없을 수 있습니다. 대신 GetApplicationLink 또는 GetWebLink를 사용합니다.

DataPackageView에 포함된 URI를 가져옵니다.

public:
 virtual IAsyncOperation<Uri ^> ^ GetUriAsync() = GetUriAsync;
/// [Windows.Foundation.Metadata.Deprecated("GetUriAsync may be altered or unavailable for releases after Windows 8.1. Instead, use GetWebLinkAsync or GetApplicationLinkAsync.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<Uri> GetUriAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("GetUriAsync may be altered or unavailable for releases after Windows 8.1. Instead, use GetWebLinkAsync or GetApplicationLinkAsync.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
IAsyncOperation<Uri> GetUriAsync();
[Windows.Foundation.Metadata.Deprecated("GetUriAsync may be altered or unavailable for releases after Windows 8.1. Instead, use GetWebLinkAsync or GetApplicationLinkAsync.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<System.Uri> GetUriAsync();
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("GetUriAsync may be altered or unavailable for releases after Windows 8.1. Instead, use GetWebLinkAsync or GetApplicationLinkAsync.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public IAsyncOperation<System.Uri> GetUriAsync();
function getUriAsync()
Public Function GetUriAsync () As IAsyncOperation(Of Uri)

반환

Uri입니다.

특성

예제

if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.uri)) {
    shareOperation.data.getUriAsync().then(function (uri) {
        if (uri !== null) {
            // To output the link using this example, 
            // you need a div tag with an id of "output" in your HTML file.
            document.getElementById("output").innerText = uri.absoluteUri;
        }
    });
}
shareOperation.reportCompleted();

적용 대상