< Dice‎ | PbP‎ | RollPost
Revision as of 00:51, 6 October 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|RollPost.HasDivergedFrom Method (RollPost)}} Test if two RollPosts have diverged. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public virtual bool HasDivergedFro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

RollPost.HasDivergedFrom Method (RollPost)

From DiceRoller Documentation

Test if two RollPosts have diverged.

  • Namespace: Dice.PbP
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

public virtual bool HasDivergedFrom(
    RollPost other
)

Parameters

other
Type: Dice.PbP.RollPost
RollPost to check against

Return Value

Type: System.Boolean

Returns true if the two RollPosts have diverged and false if they have not.

Remarks

Much like Validate, two RollPosts are considered to be divergent if one is not a prefix of the other. The logic to check this mirrors what is used in Validate, however it does not call Validate. Therefore, classes which extend RollPost should override both Validate and HasDivergedFrom in order to ensure that the logic between the two is consistent.

Unlike Validate, HasDivergedFrom has no side effects.