logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class InMemoryAchievementScreenshotStore

    In-memory IAchievementScreenshotStore used for tests. Hands back the same folder-shaped key the blob-backed store does, so assertions can check the key the unlock record ends up carrying.

    Inheritance
    object
    InMemoryAchievementScreenshotStore
    Implements
    IAchievementScreenshotStore
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Achievements.Tests.Fakes
    Assembly: Tests.dll
    Syntax
    public class InMemoryAchievementScreenshotStore : IAchievementScreenshotStore

    Constructors

    InMemoryAchievementScreenshotStore()

    Declaration
    public InMemoryAchievementScreenshotStore()

    Properties

    DeleteAllCallCount

    How many times DeleteAllAsync(PlayerId, CancellationToken) has been called.

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

    SavedKeys

    The keys written so far, in write order.

    Declaration
    public List<string> SavedKeys { get; }
    Property Value
    Type Description
    List<string>

    Methods

    DeleteAllAsync(PlayerId, CancellationToken)

    Declaration
    public Task DeleteAllAsync(PlayerId player, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    PlayerId player
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    Read(string)

    Reads back the bytes stored under a key, or null when nothing was stored for it.

    Declaration
    public byte[] Read(string key)
    Parameters
    Type Name Description
    string key

    The key handed back by SaveAsync(PlayerId, AchievementId, byte[], CancellationToken).

    Returns
    Type Description
    byte[]

    SaveAsync(PlayerId, AchievementId, byte[], CancellationToken)

    Declaration
    public Task<string> SaveAsync(PlayerId player, AchievementId achievement, byte[] pngBytes, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    PlayerId player
    AchievementId achievement
    byte[] pngBytes
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>

    Implements

    IAchievementScreenshotStore
    In this article
    © 2026 Serenity. All Rights Reserved