SerializeAttribute
Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating!
Halfling.Serialization.SerializeAttribute
When attributed to a field or property, allows the serialization and deserialization behavior of that field or property to be customized. If the SerializeContent attribute is defined on a class and the Explicit property is true, then only fields and properties with a Serialize attribute will be serialized and deserialized.
Part of Halfling, the game engine, this class has an effect on all parameters available for modding.
Name | Type | Required? | Access | Default value | Description |
---|---|---|---|---|---|
Read | bool | - | {get; set;} | true | Set to false to prevent deserialization. |
Write | bool | - | {get; set;} | true | Set to false to prevent serialization. |
Optional | bool | - | {get; set;} | false
(effectively) |
Gets or sets whether the attributed field or property is optional when deserializing.
If true, the parameter can be missing from a mod's .rule file without causing a crash. If false, it's required : if you use that class and it doesn't inherit from something that sets this value, you set it or get a crash. |
ReadContentOnly | bool | - | {get; set;} | false
(effectively) |
|
DefaultValue | object? | - | {get; set;} | - | |
InheritMember | bool | - | {get; set;} | false
(effectively) |
Gets or sets whether the MemberInfo passed when deserializing the attributed field or property will be the MemberInfo passed when deserializing the containing object, as opposed to the MemberInfo of the attributed field or property itself. |
Notes
Nothing yet.
See also
Nothing yet.