Version 2.1.0.0

ISelfFormatter interface

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public interface ISelfFormatter
Specifies that a type is capable of serializing itself using an IDataWriter and an IDataReader.

The deserialized type instance will be created without a constructor call using the System.Runtime.Serialization.FormatterServices.GetUninitializedObject(System.Type) method if it is a reference type, otherwise it will be created using default(type).

Use AlwaysFormatsSelfAttribute to specify that a class which implements this interface should *always* format itself regardless of other formatters being specified.

Methods

Deserialize(IDataReader)
Deserializes data into the instance using the given reader.
void Deserialize(IDataReader reader)
Parameters
IDataReader reader

Serialize(IDataWriter)
Serializes the instance's data using the given writer.
void Serialize(IDataWriter writer)
Parameters
IDataWriter writer

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.