logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementSdkInspector

    Compares what a storefront SDK requires against what the project actually has: is the SDK compiled in, and is its scripting define set.

    Inheritance
    object
    AchievementSdkInspector
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Achievements.Infrastructure.Editor.Platforms
    Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
    Syntax
    public static class AchievementSdkInspector
    Remarks

    Takes both answers as functions instead of reading the project, so every state is assertable without an SDK, a build target or an editor — which matters more here than anywhere else, because none of the four SDKs will ever be installed in this repository and the states that only appear when one IS installed would otherwise be untestable.

    Whoever calls it supplies the two lookups; that supply is the part that cannot be tested cheaply, and keeping it out of here is what leaves the rules testable.

    Methods

    Inspect(AchievementSdkManifest, Func<string, bool>, Func<string, bool>)

    Measures one storefront's SDK against its manifest.

    Declaration
    public static AchievementSdkInstallationReport Inspect(AchievementSdkManifest manifest, Func<string, bool> typeExists, Func<string, bool> isScriptingDefineSet)
    Parameters
    Type Name Description
    AchievementSdkManifest manifest

    What the storefront requires.

    Func<string, bool> typeExists

    Answers whether a full type name resolves in this project.

    Func<string, bool> isScriptingDefineSet

    Answers whether a define is set for the build target being inspected.

    Returns
    Type Description
    AchievementSdkInstallationReport

    The report.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when a required argument is null.

    InspectAll(Func<string, bool>, Func<string, bool>)

    Measures every shipped manifest against the same project.

    Declaration
    public static IReadOnlyList<AchievementSdkInstallationReport> InspectAll(Func<string, bool> typeExists, Func<string, bool> isScriptingDefineSet)
    Parameters
    Type Name Description
    Func<string, bool> typeExists

    Answers whether a full type name resolves in this project.

    Func<string, bool> isScriptingDefineSet

    Answers whether a define is set for the build target being inspected.

    Returns
    Type Description
    IReadOnlyList<AchievementSdkInstallationReport>

    One report per shipped storefront, in manifest order.

    Remarks

    One storefront that cannot be measured costs only itself. The lookups reach into whatever the project loaded — a half-loaded assembly, a broken package — and a throw from any of them would otherwise leave the window with no reports at all, hiding three healthy storefronts behind one broken question.

    In this article
    © 2026 Serenity. All Rights Reserved