Class AchievementIconDownload
What a connector brought back when asked to download one storefront icon: the image bytes, already checked to be an image, or why nothing was brought back.
Inherited Members
Namespace: Serenity.Achievements.Application.Sync
Assembly: Serenity.Achievements.Application.dll
Syntax
public sealed class AchievementIconDownload
Remarks
A failed download is a value, not an exception, because the caller applying a pull reports one icon as one failed row and carries on with everything else.
Properties
FailureReason
Declaration
public string FailureReason { get; }
Property Value
| Type | Description |
|---|---|
| string | Why nothing was brought back; empty when the download succeeded. |
FileExtension
Declaration
public string FileExtension { get; }
Property Value
| Type | Description |
|---|---|
| string | The file extension of the image's real format, lower case with its dot; empty when the download failed. |
ImageBytes
Declaration
public byte[] ImageBytes { get; }
Property Value
| Type | Description |
|---|---|
| byte[] | The image exactly as the storefront served it; empty when the download failed. |
Succeeded
Declaration
public bool Succeeded { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether an image was brought back. |
Methods
Downloaded(byte[], string)
A download that brought an image back.
Declaration
public static AchievementIconDownload Downloaded(byte[] imageBytes, string fileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | imageBytes | The image bytes, which the connector has checked decode as an image. |
| string | fileExtension | The extension of the image's real format, for example |
Returns
| Type | Description |
|---|---|
| AchievementIconDownload |
Failed(string)
A download that brought nothing back.
Declaration
public static AchievementIconDownload Failed(string failureReason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | failureReason | Why, in a sentence an author can read. |
Returns
| Type | Description |
|---|---|
| AchievementIconDownload |