< Dice‎ | PbP‎ | RollPost

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.