Class AchievementSettingsValidator
Answers whether an AchievementSettingsCreator.Input can be written, and says why not when it cannot. Reached through Validate(Input) and ValidateIdentity(Input) — this type is where the rules live, those are the API every window and test calls.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Builder
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public static class AchievementSettingsValidator
Remarks
Split out of the creator because deciding whether a request is authorable and actually authoring it are two jobs with different reasons to change: a new field adds a rule here, a new asset adds a step there. Every path check is deliberately conservative — an occupied asset path is refused rather than worked around, so no run can silently overwrite or rename an asset a project already depends on.
Fields
MaximumProgressPushStepPercent
Largest legal PlatformProgressPushStepPercent.
Declaration
public const int MaximumProgressPushStepPercent = 100
Field Value
| Type | Description |
|---|---|
| int |
MinimumProgressPushStepPercent
Smallest legal PlatformProgressPushStepPercent, so a window can clamp its slider to the very range this validator enforces.
Declaration
public const int MinimumProgressPushStepPercent = 1
Field Value
| Type | Description |
|---|---|
| int |
Methods
Validate(Input)
Every rule, in the order an author reads the wizard: where it lands, what it is called, what stores it, which storefronts it reaches, how it behaves, and what it looks like.
Declaration
public static SerenityCreationValidationResult Validate(AchievementSettingsCreator.Input input)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSettingsCreator.Input | input |
Returns
| Type | Description |
|---|---|
| SerenityCreationValidationResult |
ValidateIdentity(Input)
Id-only validation, usable before a folder, backend or platform choice has been made.
Declaration
public static SerenityCreationValidationResult ValidateIdentity(AchievementSettingsCreator.Input input)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSettingsCreator.Input | input |
Returns
| Type | Description |
|---|---|
| SerenityCreationValidationResult |