ISerializationPolicy interface

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public interface ISerializationPolicy
Defines which members to serialize and deserialize when there aren't any custom formatters for a type. Usually, it governs the behaviour of the FormatterEmitter and ReflectionFormatter<T> classes.


Gets a value indicating whether to allow non serializable types. (Types which are not decorated with System.SerializableAttribute.)
bool AllowNonSerializableTypes { get; }
Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize can be recovered upon deserialization without knowing the policy ahead of time. This ID should preferably be unique.
string ID { get; }


Gets a value indicating whether a given System.Reflection.MemberInfo should be serialized or not.
bool ShouldSerializeMember(MemberInfo member)
System.Reflection.MemberInfo member

The member to check.


true if the given member should be serialized, otherwise, false.

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.