Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 13, 2025

This PR addresses the lack of usage documentation for the StoreCollectionData.AcquiredDate property by adding comprehensive examples and clarifications.

Changes Made

Enhanced storecollectiondata_acquireddate.md:

  • Added a complete C# example showing how to access the AcquiredDate property
  • Clarified that AcquiredDate represents when the user first acquired the product from the Microsoft Store (not the installation date)
  • Explained the difference between acquired date vs installation date
  • Added proper error handling in the example
  • Included cross-references to related methods like GetUserCollectionAsync

Updated storecollectiondata.md:

  • Added a comprehensive example showing how to access StoreCollectionData objects
  • Demonstrated the complete flow: StoreContext → GetUserCollectionAsync → StoreSku → CollectionData
  • Showed usage of multiple properties (AcquiredDate, IsTrial)

Improved storesku_collectiondata.md:

  • Clarified that the property returns null when user has no entitlement
  • Added guidance on how to access StoreSku objects with collection data
  • Enhanced cross-references to related documentation

Example Usage

The documentation now shows developers exactly how to get the AcquiredDate:

StoreContext storeContext = StoreContext.GetDefault();
string[] productKinds = { "Application", "Durable" };
StoreProductQueryResult queryResult = await storeContext.GetUserCollectionAsync(productKinds);

foreach (StoreProduct product in queryResult.Products)
{
    foreach (StoreSku sku in product.Skus)
    {
        if (sku.CollectionData != null)
        {
            DateTime acquiredDate = sku.CollectionData.AcquiredDate;
            // Use the acquired date...
        }
    }
}

This resolves the user's questions about:

  1. How to use the AcquiredDate property with concrete examples
  2. How to obtain StoreCollectionData objects (via StoreContext methods)
  3. What AcquiredDate represents vs installation date

Fixes #1850.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@prmerger-automator prmerger-automator bot added the do-not-merge PR is being processed and awaiting review/approval. label Aug 13, 2025
Co-authored-by: GrantMeStrength <1928855+GrantMeStrength@users.noreply.github.com>
Copilot AI changed the title [WIP] No info on usage Add comprehensive usage examples for StoreCollectionData.AcquiredDate property Aug 13, 2025
Copilot AI requested a review from GrantMeStrength August 13, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge PR is being processed and awaiting review/approval. review-team-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No info on usage

2 participants