Interface IAchievementScreenshotCapturer
Application port for grabbing the frame that was on screen when an achievement unlocked.
Namespace: Serenity.Achievements.Application.Interfaces.Services
Assembly: Serenity.Achievements.Application.dll
Syntax
public interface IAchievementScreenshotCapturer
Remarks
Capture is best-effort by design: an unlock never waits on it and never fails because of it, so a capturer reports failure by returning null rather than by throwing.
Properties
IsEnabled
Whether capture is configured and possible in this build.
Declaration
bool IsEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
TryCaptureAsync(CancellationToken)
Captures the current frame as encoded PNG bytes.
Declaration
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. |