< Dice‎ | PbP‎ | RollPost

Difference between revisions of "Dice/PbP/RollPost/GetObjectData"

From DiceRoller Documentation
(Created page with "{{APIdoc|RollPost.GetObjectData Method (SerializationInfo, StreamingContext)}} Serializes a RollPost. {{ns|PbP}} == Syntax == <syntaxhighlight lang="C#"> public virtual void...")
 
 
Line 29: Line 29:
  
 
== Remarks ==
 
== Remarks ==
RollPost does '''not''' roundtrip when serializing/deserializing. Instead, serializing a RollPost will serialize Pristine and Current. Deserializing will cause those to go into Pristine and Stored, respectively.
+
By default, RollPost roundtrips when serializing/deserializing.
 +
 
 +
When calling the [[../Serialize|RollPost.Serialize method]], serializing a RollPost will serialize Pristine and Current and deserializing (via any method) will cause those to go into Pristine and Stored, respectively. This behavior is based on the StreamingContext.

Latest revision as of 16:27, 15 May 2017

Serializes a RollPost.

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

Syntax

public virtual void GetObjectData(
    SerializationInfo info,
    StreamingContext context
)

Parameters

info
Type: System.Runtime.Serialization.SerializationInfo
Container where serialized data is written to.
context
Type: System.Runtime.Serialization.StreamingContext
Streaming context, unused.

Exceptions

Exception Condition
ArgumentNullException info is null.

Remarks

By default, RollPost roundtrips when serializing/deserializing.

When calling the RollPost.Serialize method, serializing a RollPost will serialize Pristine and Current and deserializing (via any method) will cause those to go into Pristine and Stored, respectively. This behavior is based on the StreamingContext.