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.


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

Serializes the instance's data using the given writer.
void Serialize(IDataWriter writer)
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.