< Dice‎ | PbP‎ | RollPost
Revision as of 16:37, 15 May 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|RollPost.Serialize Method (Stream)}} Serializes a RollPost, for saving to the database. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public void Serialize( S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

RollPost.Serialize Method (Stream)

From DiceRoller Documentation

Serializes a RollPost, for saving to the database.

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

Syntax

public void Serialize(
    Stream serializationStream
)

Parameters

serializationStream
Type: System.IO.Stream
The stream to write serialized data to.

Remarks

This method should be used whenever serializing a RollPost for persistent storage. It will serialize Pristine and Stored, but leave Current empty (note that Current is written into Stored when Validate() is called).

See Also

The [[..|RollPost class documentation]] contains an example using Serialize() to store data into a database.