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.
Implements
Inherited Members
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. |