logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementSyncReviewSelection

    Which field changes of a sync plan an author has accepted to apply, tracked independently of the plan itself so a review window can re-plan (for example after a pull refresh) without losing selections that still make sense.

    Inheritance
    object
    AchievementSyncReviewSelection
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Achievements.Application.Sync
    Assembly: Serenity.Achievements.Application.dll
    Syntax
    public sealed class AchievementSyncReviewSelection
    Remarks

    Selection is keyed by (ApiName, FieldKind, LocaleCode) rather than by list position, because a plan's item order can shift between two runs while the identity of "the Spanish description of achievement FIRST_JUMP" cannot. Only Add, Update and Offered changes are ever selectable, and an offered one only one at a time — an accept-all, an accept-item and an invert leave it alone, because taking it replaces something the project already holds. A LocalizationKeyAdoption row is taken the same way, one at a time, because it changes the identity the achievement syncs under from then on (see IsAcceptedOnlyOnItsOwn). An Unchanged change has nothing to apply, an Unsupported one cannot travel, and a conflicted item has no field changes to select in the first place.

    An acceptance remembers the kind of change it was given for, and counts only for a row of that same kind: an icon taken as an Add in one run does not arrive already ticked when the next plan offers the same icon as Offered. An acceptance given without a kind counts for any row that is not offered.

    Constructors

    AchievementSyncReviewSelection()

    Declaration
    public AchievementSyncReviewSelection()

    Properties

    TotalAcceptedCount

    Declaration
    public int TotalAcceptedCount { get; }
    Property Value
    Type Description
    int

    How many field changes are currently accepted, across every plan this selection has ever been used with — not scoped to any one plan, unlike SelectableCount(AchievementSyncPlan). A stale accepted key from a plan that has since changed still counts here until it is explicitly rejected.

    Methods

    Accept(string, AchievementSyncFieldKind, string, AchievementSyncChangeKind)

    Marks one field change as accepted, for a row of that kind of change only.

    Declaration
    public void Accept(string apiName, AchievementSyncFieldKind fieldKind, string localeCode, AchievementSyncChangeKind changeKind)
    Parameters
    Type Name Description
    string apiName

    The achievement's platform-side identity key.

    AchievementSyncFieldKind fieldKind

    The field the change is for.

    string localeCode

    The locale the change is for, or empty when the field is not localized.

    AchievementSyncChangeKind changeKind

    The kind of change the author saw when accepting.

    AcceptAll(AchievementSyncPlan)

    Accepts every selectable field change in the plan, and none of the rest.

    Declaration
    public void AcceptAll(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to accept every change of. May be null.

    AcceptItem(AchievementSyncPlanItem)

    Accepts every bulk-selectable field change belonging to one item; an offered one stays as it was.

    Declaration
    public void AcceptItem(AchievementSyncPlanItem item)
    Parameters
    Type Name Description
    AchievementSyncPlanItem item

    The item to accept every change of. May be null or conflicted, in which case nothing happens.

    AcceptedBulkSelectableCount(AchievementSyncPlan)

    How many of the rows an accept-all can reach are accepted.

    Declaration
    public int AcceptedBulkSelectableCount(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count. May be null.

    Returns
    Type Description
    int

    AcceptedFingerprint(AchievementSyncPlan)

    A text that names exactly the rows of plan that are accepted, each as the kind of change it is: two selections with the same fingerprint over the same plan apply the same thing, and swapping one accepted row for another changes it even though the count stays.

    Declaration
    public string AcceptedFingerprint(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to read the accepted rows of. May be null.

    Returns
    Type Description
    string

    AcceptedOneByOneCount(AchievementSyncPlan)

    How many of the rows an accept-all never takes are accepted, each by ticking it alone.

    Declaration
    public int AcceptedOneByOneCount(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count. May be null.

    Returns
    Type Description
    int

    BulkSelectableCount(AchievementSyncPlan)

    How many field changes in the plan an accept-all can reach.

    Declaration
    public int BulkSelectableCount(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count. May be null.

    Returns
    Type Description
    int

    Invert(AchievementSyncPlan)

    Flips every selectable field change in the plan: accepted becomes rejected and rejected becomes accepted.

    Declaration
    public void Invert(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to invert the selection of. May be null.

    IsAccepted(AchievementSyncPlanItem, AchievementSyncFieldChange)

    Whether the row change of item is accepted as the kind of change it is now.

    Declaration
    public bool IsAccepted(AchievementSyncPlanItem item, AchievementSyncFieldChange change)
    Parameters
    Type Name Description
    AchievementSyncPlanItem item

    The achievement the row belongs to.

    AchievementSyncFieldChange change

    The row.

    Returns
    Type Description
    bool

    IsAccepted(string, AchievementSyncFieldKind, string)

    Whether one field change is currently accepted, for whatever kind of change it was accepted as.

    Declaration
    public bool IsAccepted(string apiName, AchievementSyncFieldKind fieldKind, string localeCode)
    Parameters
    Type Name Description
    string apiName

    The achievement's platform-side identity key.

    AchievementSyncFieldKind fieldKind

    The field the change is for.

    string localeCode

    The locale the change is for, or empty when the field is not localized.

    Returns
    Type Description
    bool

    OneByOneCount(AchievementSyncPlan)

    How many rows in the plan an accept-all never takes, because each is accepted by ticking it alone.

    Declaration
    public int OneByOneCount(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count. May be null.

    Returns
    Type Description
    int

    Reject(string, AchievementSyncFieldKind, string)

    Marks one field change as not accepted.

    Declaration
    public void Reject(string apiName, AchievementSyncFieldKind fieldKind, string localeCode)
    Parameters
    Type Name Description
    string apiName

    The achievement's platform-side identity key.

    AchievementSyncFieldKind fieldKind

    The field the change is for.

    string localeCode

    The locale the change is for, or empty when the field is not localized.

    RejectAll()

    Clears every accepted field change, regardless of which plan they came from.

    Declaration
    public void RejectAll()

    RejectItem(AchievementSyncPlanItem)

    Rejects every field change belonging to one item, selectable or not.

    Declaration
    public void RejectItem(AchievementSyncPlanItem item)
    Parameters
    Type Name Description
    AchievementSyncPlanItem item

    The item to reject every change of. May be null.

    SelectableCount(AchievementSyncPlan)

    How many field changes in the plan are selectable at all.

    Declaration
    public int SelectableCount(AchievementSyncPlan plan)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count. May be null.

    Returns
    Type Description
    int

    SetAccepted(AchievementSyncPlanItem, AchievementSyncFieldChange, bool)

    Accepts or rejects the row change of item, as the kind of change it is now.

    Declaration
    public void SetAccepted(AchievementSyncPlanItem item, AchievementSyncFieldChange change, bool accepted)
    Parameters
    Type Name Description
    AchievementSyncPlanItem item

    The achievement the row belongs to.

    AchievementSyncFieldChange change

    The row.

    bool accepted

    Whether the author ticked the row.

    In this article
    © 2026 Serenity. All Rights Reserved