< Dice‎ | PbP‎ | RollPost
Revision as of 22:59, 27 April 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|RollPost Constructor (SerializationInfo, StreamingContext)}} Constructs a new RollPost using serialized data. {{ns}} == Syntax == <syntaxhighlight lang="C#"> protec...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

RollPost Constructor (SerializationInfo, StreamingContext)

From DiceRoller Documentation

Constructs a new RollPost using serialized data.

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

Syntax

protected RollPost(
    SerializationInfo info,
    StreamingContext context
)

Parameters

info
Type: System.Runtime.Serialization.SerializationInfo
Serialized data to fill object with.
context
Type: System.Runtime.Serialization.StreamingContext
Streaming context, unused.

Exceptions

Exception Condition
ArgumentNullException info is null.

Remarks

This should be used whenever creating a RollPost based on an existing post. It can be called via calling Deserialize() on a serialized RollPost. StoredList and PristineList are initialized from the deserialized data (although they will contain only nulls until the OnDeserialization callback is fired). CurrentList is initialized to an empty list.