< Dice‎ | RollData

RollData.Metadata Property

From DiceRoller Documentation

Gets or sets an optional metadata object that is passed as-is to the RollResult and is serialized alongside it.

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

Syntax

public object Metadata { get; set; }

Property Value

Type: System.Object

The metadata object

Remarks

The object should be able to roundtrip when serialized/deserialized. Implement ISerializable if needed. By default, Metadata is null. Metadata objects are not considered when determining if two RollResults are equal to each other.

It is anticipated that this would be used to store extra properties related to the roll which should be saved at a per-roll level rather than a per-post level. If saving at a per-post level, it would likely make more sense to implement those properties as additional fields in the database.