logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementIconPayload

    One achievement icon in neutral wire form: the PNG bytes a push sends, or the identifying information a pull reads back without downloading the image itself.

    Inheritance
    object
    AchievementIconPayload
    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 AchievementIconPayload
    Remarks

    Hashing is deliberately not this type's job. Whoever builds a push-side payload already has the source texture and the reason to hash it (change detection against a previous snapshot); making the payload hash itself would mean hashing again on every read, and a pull-side payload has no bytes to hash in the first place — only RemoteReference, the platform's own file name for the icon it already stores.

    Constructors

    AchievementIconPayload(byte[], int, int, string, string, string)

    Creates an icon payload.

    Declaration
    public AchievementIconPayload(byte[] pngBytes, int width, int height, string contentHashHex, string remoteReference, string storefrontCopyReference = "")
    Parameters
    Type Name Description
    byte[] pngBytes

    The PNG bytes, or empty on the pull side.

    int width

    The icon width in pixels.

    int height

    The icon height in pixels.

    string contentHashHex

    The content hash the builder computed, or empty when none was computed.

    string remoteReference

    The platform-side file name for this icon, or empty on the push side.

    string storefrontCopyReference

    The reference of the storefront download this image is a re-encoding of, or empty when the image is the author's own.

    Properties

    ContentHashHex

    Declaration
    public string ContentHashHex { get; }
    Property Value
    Type Description
    string

    The content hash whoever built this payload computed, or empty when none was computed.

    Height

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

    The icon height in pixels.

    None

    An icon payload carrying nothing — the "no icon" default.

    Declaration
    public static AchievementIconPayload None { get; }
    Property Value
    Type Description
    AchievementIconPayload

    PngBytes

    Declaration
    public byte[] PngBytes { get; }
    Property Value
    Type Description
    byte[]

    The PNG bytes, or empty when this payload carries no image data.

    RemoteReference

    Declaration
    public string RemoteReference { get; }
    Property Value
    Type Description
    string

    The platform's own file name for this icon, or empty when this payload carries no image data yet.

    StorefrontCopyReference

    Declaration
    public string StorefrontCopyReference { get; }
    Property Value
    Type Description
    string

    The reference of the storefront download this image is a copy of — the project's icon is the storefront's own copy, brought in by a pull — or empty when the image is the author's own. A push uses it to leave a copy the storefront already holds alone instead of sending it back.

    Width

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

    The icon width in pixels.

    In this article
    © 2026 Serenity. All Rights Reserved