Table of Contents

Class IconSettingsState

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

The stored form of IconSettings — the values a site can change, without the behaviour.

public sealed record IconSettingsState : IEquatable<IconSettingsState>
Inheritance
IconSettingsState
Implements
Inherited Members

Remarks

Separate from IconSettings on purpose: that is a live singleton the icon pipeline reads on every resolve, and persisting it directly would tie what is stored to what happens to be mutable.

Properties

AllowAdminUpload

Whether administrators (holders of users:manage) may upload an icon for a user.

public bool AllowAdminUpload { get; init; }

Property Value

bool

AllowUserUpload

Whether users may upload their own icon (the profile "Change picture" action).

public bool AllowUserUpload { get; init; }

Property Value

bool

DefaultUserIconUrl

A generic default image URL shown for users with no uploaded icon (used after Gravatar, or instead of it when GravatarEnabled is false). Null falls back to initials.

public string DefaultUserIconUrl { get; init; }

Property Value

string

GravatarEnabled

Whether the built-in Gravatar fallback is used for users without an uploaded icon.

public bool GravatarEnabled { get; init; }

Property Value

bool

GravatarStyle

Gravatar default-image style used when the email has no Gravatar account — one of All. Null or blank resolves to Default.

public string GravatarStyle { get; init; }

Property Value

string

Methods

ApplyTo(IconSettings)

Writes these values onto a live IconSettings.

public void ApplyTo(IconSettings settings)

Parameters

settings IconSettings

From(IconSettings)

Reads the current values off a live IconSettings.

public static IconSettingsState From(IconSettings settings)

Parameters

settings IconSettings

Returns

IconSettingsState