logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class NullAchievementScreenshotCapturer

    The capturer installed when screenshots are switched off or the platform cannot grab a frame: reports itself disabled and captures nothing. Keeps the unlock path free of null checks in headless builds and tests.

    Inheritance
    object
    NullAchievementScreenshotCapturer
    Implements
    IAchievementScreenshotCapturer
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Achievements.Application.Services
    Assembly: Serenity.Achievements.Application.dll
    Syntax
    public sealed class NullAchievementScreenshotCapturer : IAchievementScreenshotCapturer

    Constructors

    NullAchievementScreenshotCapturer()

    Declaration
    public NullAchievementScreenshotCapturer()

    Properties

    IsEnabled

    Whether capture is configured and possible in this build.

    Declaration
    public bool IsEnabled { get; }
    Property Value
    Type Description
    bool

    Methods

    TryCaptureAsync(CancellationToken)

    Captures the current frame as encoded PNG bytes.

    Declaration
    public Task<byte[]> TryCaptureAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    Token used to cancel the operation.

    Returns
    Type Description
    Task<byte[]>

    The encoded PNG bytes, or null when capture is disabled or failed.

    Implements

    IAchievementScreenshotCapturer
    In this article
    © 2026 Serenity. All Rights Reserved