Table of Contents

Class IconCapability

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Whether the icon feature can actually do what a surface is about to promise.

public static class IconCapability
Inheritance
IconCapability
Inherited Members

Remarks

Both prerequisites here are opt-ins that fail silently when unmet: a user entity that does not declare Icon discards the reference write and reports success, and the default NoOpIconProcessor returns the image untouched. Neither is wrong as a default — consumers own their entity types, and image processing is a separate package — but "unmet prerequisite" and "worked" must not look the same to the caller. Ask here before offering or attempting the operation.

Methods

CanPersistUserIcon(Type)

Whether userEntityType can persist an icon reference — it declares Icon. The interface member is a default returning null, so an entity that never opted in still compiles and still reads as null; only the declared property makes the write stick.

public static bool CanPersistUserIcon(Type userEntityType)

Parameters

userEntityType Type

Returns

bool

CanProcessImages(IIconProcessor)

Whether processor actually transforms an image. The default NoOpIconProcessor does not, so a surface promising automatic downscaling with only that registered is telling the user something false — oversized uploads are rejected instead.

public static bool CanProcessImages(IIconProcessor processor)

Parameters

processor IIconProcessor

Returns

bool