2024-11-20 14:45:03 -03:00
# ifndef XNA_CONTENT_SERIALIZER_HPP
# define XNA_CONTENT_SERIALIZER_HPP
# include <string>
namespace xna {
2024-11-20 14:48:40 -03:00
//A custom Attribute that marks a field or property to control how it is serialized or to indicate that protected or private data should be included in serialization.
2024-11-20 14:45:03 -03:00
struct ContentSerializerAttribute {
2024-11-20 14:48:40 -03:00
//Gets or sets the XML element name (default=name of the managed type member).
2024-11-20 14:45:03 -03:00
std : : string ElementName ;
2024-11-20 14:48:40 -03:00
//Gets or sets the XML element name for each item in a collection (default = "Item").
2024-11-20 14:45:03 -03:00
std : : string CollectionItemName ;
2024-11-20 14:48:40 -03:00
//Gets or sets a value idicating whether to write member contents directly into the current XML context rather than wrapping the member in a new XML element (default=false).
2024-12-02 11:51:19 -03:00
bool FlattenContent { false } ;
2024-11-20 14:48:40 -03:00
//Indicates whether to write this element if the member is null and skip past it if not found when deserializing XML (default=false).
2024-11-20 14:45:03 -03:00
bool Optional { false } ;
2024-11-20 14:48:40 -03:00
//Get or set a value indicating whether this member can have a null value (default=true).
2024-11-20 14:45:03 -03:00
bool AllowNull { true } ;
2024-11-20 14:48:40 -03:00
//Indicates whether this member is referenced from multiple parents and should be serialized as a unique ID reference (default=false).
2024-11-20 14:45:03 -03:00
bool SharedResource { false } ;
} ;
}
# endif