Class AchievementStorefrontIcon
An icon a storefront holds for one achievement, named by a reference only the connector that produced it can make sense of, so a pull can offer to bring it in without downloading anything while it plans.
Inherited Members
Namespace: Serenity.Achievements.Application.Sync
Assembly: Serenity.Achievements.Application.dll
Syntax
public sealed class AchievementStorefrontIcon
Remarks
Deliberately separate from RemoteReference: that one tells a push "the storefront already has this exact image", which makes the planner skip the upload. The storefront's copy of an icon is not that — a storefront may keep a different encoding of what was uploaded — so a pulled address must not be mistaken for it.
Constructors
AchievementStorefrontIcon(string, string)
Creates a storefront icon.
Declaration
public AchievementStorefrontIcon(string reference, string fileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reference | The opaque reference the connector downloads the icon from; blank when there is none. |
| string | fileExtension | The image format the storefront serves it in, as a file extension. Only |
Properties
FileExtension
Declaration
public string FileExtension { get; }
Property Value
| Type | Description |
|---|---|
| string | The file extension the storefront's image format has, |
IsOffered
Declaration
public bool IsOffered { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether the storefront holds an icon the connector can download. |
None
Declaration
public static AchievementStorefrontIcon None { get; }
Property Value
| Type | Description |
|---|---|
| AchievementStorefrontIcon | The icon of an achievement the storefront holds no icon for. |
Reference
Declaration
public string Reference { get; }
Property Value
| Type | Description |
|---|---|
| string | The opaque reference the connector downloads the icon from; empty when the storefront holds none. A connector must change the reference whenever the icon's content changes. A pull does not offer a saved copy again while the storefront's reference is the one the file was saved from (the reference is recorded on the file), so a connector whose reference stayed the same for a different image would never see that image offered. Steam's references are content-addressed — the address carries the image's hash — which is why the rule holds for it. |