Beispiel #1
0
        async Task <bool> PlatformTryOpenAsync(Uri uri)
        {
            var canOpen = await PlatformCanOpenAsync(uri);

            if (canOpen)
            {
                return(await WinLauncher.LaunchUriAsync(uri).AsTask());
            }

            return(canOpen);
        }
Beispiel #2
0
        static async Task <bool> PlatformTryOpenAsync(Uri uri)
        {
            var canOpen = await PlatformCanOpenAsync(uri).ConfigureAwait(false);

            if (canOpen)
            {
                return(await WinLauncher.LaunchUriAsync(uri).AsTask().ConfigureAwait(false));
            }

            return(canOpen);
        }
Beispiel #3
0
        static async Task <bool> PlatformCanOpenAsync(Uri uri)
        {
            var supported = await WinLauncher.QueryUriSupportAsync(uri, LaunchQuerySupportType.Uri);

            return(supported == LaunchQuerySupportStatus.Available);
        }
Beispiel #4
0
 static Task PlatformOpenAsync(Uri uri) =>
 WinLauncher.LaunchUriAsync(uri).AsTask();
Beispiel #5
0
        async Task <bool> PlatformOpenAsync(OpenFileRequest request)
        {
            var storageFile = request.File.File ?? await StorageFile.GetFileFromPathAsync(request.File.FullPath);

            return(await WinLauncher.LaunchFileAsync(storageFile).AsTask());
        }
Beispiel #6
0
 Task <bool> PlatformOpenAsync(Uri uri) =>
 WinLauncher.LaunchUriAsync(uri).AsTask();