Version 2.1.0.0

StackFormatter<TStack, TValue> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public class StackFormatter<TStack, TValue> : BaseFormatter<TStack>, IFormatter<TStack>, IFormatter where TStack : Stack<TValue>, new()
Custom generic formatter for the generic type definition System.Collections.Generic.Stack`1 and types derived from it.
Inheritance
  • System.Object
  • BaseFormatter<TStack>
  • StackFormatter<TStack, TValue>

Type Parameters

TStack

TValue

Constructors

StackFormatter()
public StackFormatter()

Methods

DeserializeImplementation(ref TStack, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref TStack value, IDataReader reader)
Parameters
TStack value

The uninitialized value to serialize into. This value will have been created earlier using GetUninitializedObject().

Sirenix.Serialization.IDataReader reader

The reader to deserialize with.

GetUninitializedObject()
Returns null.
protected override TStack GetUninitializedObject()
Returns
TStack

A null value.

SerializeImplementation(ref TStack, IDataWriter)
Provides the actual implementation for serializing a value of type .
protected override void SerializeImplementation(ref TStack value, IDataWriter writer)
Parameters
TStack value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.