-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # src/Uno.UWP/Generated/3.0.0.0/Windows.Services.Store/StoreRateAndReviewResult.cs # src/Uno.UWP/Generated/3.0.0.0/Windows.Services.Store/StoreRateAndReviewStatus.cs # src/Uno.UWP/Services/Store/StoreContext.cs # src/Uno.UWP/Services/Store/StoreContext.iOS.cs
- Loading branch information
1 parent
e4d13bc
commit 672148d
Showing
4 changed files
with
104 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.Foundation; | ||
using Windows.Foundation; | ||
|
||
namespace Windows.Services.Store | ||
{ | ||
public sealed partial class StoreContext | ||
{ | ||
private StoreContext() { } | ||
|
||
public static StoreContext GetDefault() | ||
private StoreContext() | ||
{ | ||
return new StoreContext(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets a StoreContext object that can be used to access | ||
/// and manage store-related data for the current | ||
/// user in the context of the current app. | ||
/// </summary> | ||
/// <returns>An object that you can use to access and manage | ||
/// store-related data for the current user.</returns> | ||
public static StoreContext GetDefault() => new StoreContext(); | ||
|
||
/// <summary> | ||
/// Requests the user to rate and review the app. This method will | ||
/// display the UI for the user to select a store rating and add | ||
/// an optional store review for the product. | ||
/// </summary> | ||
/// <returns>Store rate and review result.</returns> | ||
/// <remarks> | ||
/// On iOS and macOS, it is not possible to know whether the user | ||
/// actually rated the app or whether the system allowed the dialog | ||
/// to be displayed. | ||
/// </remarks> | ||
public IAsyncOperation<StoreRateAndReviewResult> RequestRateAndReviewAppAsync() => | ||
AsyncOperation.FromTask(ct => RequestRateAndReviewAppTaskAsync(ct)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#nullable enable | ||
|
||
using System; | ||
|
||
namespace Windows.Services.Store | ||
{ | ||
/// <summary> | ||
/// Provides response data for a request to rate and review the product. | ||
/// </summary> | ||
public partial class StoreRateAndReviewResult | ||
{ | ||
internal StoreRateAndReviewResult(StoreRateAndReviewStatus status, Exception? extendedError = null) | ||
{ | ||
Status = status; | ||
ExtendedError = extendedError; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the status for the rate and review request for the product. | ||
/// </summary> | ||
public StoreRateAndReviewStatus Status { get; } | ||
|
||
/// <summary> | ||
/// Gets the error code for the request, if the operation encountered an error. | ||
/// </summary> | ||
public Exception? ExtendedError { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Windows.Services.Store | ||
{ | ||
/// <summary> | ||
/// Gets the result status for the rate and review request for the product. | ||
/// </summary> | ||
public enum StoreRateAndReviewStatus | ||
{ | ||
/// <summary> | ||
/// The request was successful. | ||
/// </summary> | ||
Succeeded, | ||
|
||
/// <summary> | ||
/// The request was canceled by the user. | ||
/// </summary> | ||
CanceledByUser, | ||
|
||
/// <summary> | ||
/// The request encountered a network error. | ||
/// </summary> | ||
NetworkError, | ||
|
||
/// <summary> | ||
/// The request encountered an error. | ||
/// </summary> | ||
Error, | ||
} | ||
} |