Interface IAchievementCondition
The code escape hatch of the condition model: a rule a project writes itself, reached from
an authored tree through a CustomCondition node.
Namespace: Serenity.Achievements.Application.Conditions
Assembly: Serenity.Achievements.Application.dll
Syntax
public interface IAchievementCondition
Remarks
Narrower than AchievementCondition on purpose. A project-supplied rule is resolved and owned by the project, so it has no authored fields to validate, no serialized state for Serenity to round-trip, and no children to walk — it only has to answer the two questions the evaluator asks.
Methods
GetProgress(in AchievementEvaluationContext)
How far along the rule is. Must not mutate anything.
Declaration
AchievementConditionProgress GetProgress(in AchievementEvaluationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementEvaluationContext | context | What the world looks like at this evaluation. |
Returns
| Type | Description |
|---|---|
| AchievementConditionProgress |
IsMet(in AchievementEvaluationContext)
Whether the rule is satisfied for the given evaluation.
Declaration
bool IsMet(in AchievementEvaluationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementEvaluationContext | context | What the world looks like at this evaluation. |
Returns
| Type | Description |
|---|---|
| bool |